v2.8.0
===================================================================== --- Changes ------------------------------ - python library functions moved to `py/lib` - python scwrypts renamed in kebob-case to help prevent import - __name__ == '__main__' enforced on all python scwrypts --- New Features ------------------------- - `__override` variables now allow values to be force-overwritten - py.lib.http.client provides a slim `requests.request` wrapper --- New Scripts -------------------------- py/data/convert ) quick data converters - csv-to-json - csv-to-yaml - json-to-csv - json-to-yaml - yaml-to-csv - yaml-to-json py/linear ) uses the linear.app graphql API for PM tasks - comment --- Bug Fixes ---------------------------- - `scwrypts` handles arguments with quotes and special characters
This commit is contained in:
1
py/lib/linear/__init__.py
Normal file
1
py/lib/linear/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from py.lib.linear.client import request, graphql
|
13
py/lib/linear/client.py
Normal file
13
py/lib/linear/client.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from py.lib.http import get_request_client
|
||||
from py.lib.scwrypts import getenv
|
||||
|
||||
|
||||
request = get_request_client(
|
||||
base_url = 'https://api.linear.app',
|
||||
headers = {
|
||||
'Authorization': f'bearer {getenv("LINEAR__API_TOKEN")}',
|
||||
}
|
||||
)
|
||||
|
||||
def graphql(query):
|
||||
return request('POST', 'graphql', json={'query': query})
|
Reference in New Issue
Block a user