Skip to content

Commit 96bd017

Browse files
committed
fixes #182
1 parent 4fe9459 commit 96bd017

15 files changed

+110
-42
lines changed

00_core.ipynb

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
" self.debug,self.limit_cb,self.limit_rem = debug,limit_cb,5000\n",
202202
" self.gh_host = gh_host or GH_HOST\n",
203203
"\n",
204-
" def __call__(self, path:str, verb:str=None, headers:dict=None, route:dict=None, query:dict=None, data=None):\n",
204+
" def __call__(self, path:str, verb:str=None, headers:dict=None, route:dict=None, query:dict=None, data=None, timeout=None):\n",
205205
" \"Call a fully specified `path` using HTTP `verb`, passing arguments to `fastcore.core.urlsend`\"\n",
206206
" if verb is None: verb = 'POST' if data else 'GET'\n",
207207
" headers = {**self.headers,**(headers or {})}\n",
@@ -212,7 +212,7 @@
212212
" return_json = ('json' in headers['Accept'])\n",
213213
" debug = self.debug if self.debug else print_summary if os.getenv('GHAPI_DEBUG') else None\n",
214214
" res,self.recv_hdrs = urlsend(path, verb, headers=headers or None, debug=debug, return_headers=True,\n",
215-
" route=route or None, query=query or None, data=data or None, return_json=return_json)\n",
215+
" route=route or None, query=query or None, data=data or None, return_json=return_json, timeout=timeout)\n",
216216
" if 'X-RateLimit-Remaining' in self.recv_hdrs:\n",
217217
" newlim = self.recv_hdrs['X-RateLimit-Remaining']\n",
218218
" if self.limit_cb is not None and newlim != self.limit_rem:\n",
@@ -266,9 +266,10 @@
266266
"### GhApi.__call__\n",
267267
"\n",
268268
"> GhApi.__call__ (path:str, verb:str=None, headers:dict=None,\n",
269-
"> route:dict=None, query:dict=None, data=None)\n",
269+
"> route:dict=None, query:dict=None, data=None,\n",
270+
"> timeout=None)\n",
270271
"\n",
271-
"Call a fully specified `path` using HTTP `verb`, passing arguments to `fastcore.core.urlsend`"
272+
"*Call a fully specified `path` using HTTP `verb`, passing arguments to `fastcore.core.urlsend`*"
272273
],
273274
"text/plain": [
274275
"---\n",
@@ -278,9 +279,10 @@
278279
"### GhApi.__call__\n",
279280
"\n",
280281
"> GhApi.__call__ (path:str, verb:str=None, headers:dict=None,\n",
281-
"> route:dict=None, query:dict=None, data=None)\n",
282+
"> route:dict=None, query:dict=None, data=None,\n",
283+
"> timeout=None)\n",
282284
"\n",
283-
"Call a fully specified `path` using HTTP `verb`, passing arguments to `fastcore.core.urlsend`"
285+
"*Call a fully specified `path` using HTTP `verb`, passing arguments to `fastcore.core.urlsend`*"
284286
]
285287
},
286288
"execution_count": null,
@@ -318,9 +320,9 @@
318320
"text/markdown": [
319321
"```json\n",
320322
"{ 'node_id': 'MDM6UmVmMzE1NzEyNTg4OnJlZnMvaGVhZHMvbWFzdGVy',\n",
321-
" 'object': { 'sha': '3d27c573b7f9bdea704289567603f1d02e7e113b',\n",
323+
" 'object': { 'sha': '17efbb7eb346f0f9161c227af9c8db93597321e2',\n",
322324
" 'type': 'commit',\n",
323-
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/commits/3d27c573b7f9bdea704289567603f1d02e7e113b'},\n",
325+
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/commits/17efbb7eb346f0f9161c227af9c8db93597321e2'},\n",
324326
" 'ref': 'refs/heads/master',\n",
325327
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/refs/heads/master'}\n",
326328
"```"
@@ -329,9 +331,9 @@
329331
"{'ref': 'refs/heads/master',\n",
330332
" 'node_id': 'MDM6UmVmMzE1NzEyNTg4OnJlZnMvaGVhZHMvbWFzdGVy',\n",
331333
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/refs/heads/master',\n",
332-
" 'object': {'sha': '3d27c573b7f9bdea704289567603f1d02e7e113b',\n",
334+
" 'object': {'sha': '17efbb7eb346f0f9161c227af9c8db93597321e2',\n",
333335
" 'type': 'commit',\n",
334-
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/commits/3d27c573b7f9bdea704289567603f1d02e7e113b'}}"
336+
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/commits/17efbb7eb346f0f9161c227af9c8db93597321e2'}}"
335337
]
336338
},
337339
"execution_count": null,
@@ -360,7 +362,7 @@
360362
"\n",
361363
"> GhApi.__getitem__ (k)\n",
362364
"\n",
363-
"Lookup and call an endpoint by path and verb (which defaults to 'GET')"
365+
"*Lookup and call an endpoint by path and verb (which defaults to 'GET')*"
364366
],
365367
"text/plain": [
366368
"---\n",
@@ -371,7 +373,7 @@
371373
"\n",
372374
"> GhApi.__getitem__ (k)\n",
373375
"\n",
374-
"Lookup and call an endpoint by path and verb (which defaults to 'GET')"
376+
"*Lookup and call an endpoint by path and verb (which defaults to 'GET')*"
375377
]
376378
},
377379
"execution_count": null,
@@ -400,9 +402,9 @@
400402
"text/markdown": [
401403
"```json\n",
402404
"{ 'node_id': 'MDM6UmVmMzE1NzEyNTg4OnJlZnMvaGVhZHMvbWFzdGVy',\n",
403-
" 'object': { 'sha': '3d27c573b7f9bdea704289567603f1d02e7e113b',\n",
405+
" 'object': { 'sha': '17efbb7eb346f0f9161c227af9c8db93597321e2',\n",
404406
" 'type': 'commit',\n",
405-
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/commits/3d27c573b7f9bdea704289567603f1d02e7e113b'},\n",
407+
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/commits/17efbb7eb346f0f9161c227af9c8db93597321e2'},\n",
406408
" 'ref': 'refs/heads/master',\n",
407409
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/refs/heads/master'}\n",
408410
"```"
@@ -411,9 +413,9 @@
411413
"{'ref': 'refs/heads/master',\n",
412414
" 'node_id': 'MDM6UmVmMzE1NzEyNTg4OnJlZnMvaGVhZHMvbWFzdGVy',\n",
413415
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/refs/heads/master',\n",
414-
" 'object': {'sha': '3d27c573b7f9bdea704289567603f1d02e7e113b',\n",
416+
" 'object': {'sha': '17efbb7eb346f0f9161c227af9c8db93597321e2',\n",
415417
" 'type': 'commit',\n",
416-
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/commits/3d27c573b7f9bdea704289567603f1d02e7e113b'}}"
418+
" 'url': 'https://api.github.com/repos/fastai/ghapi-test/git/commits/17efbb7eb346f0f9161c227af9c8db93597321e2'}}"
417419
]
418420
},
419421
"execution_count": null,
@@ -1724,7 +1726,7 @@
17241726
],
17251727
"metadata": {
17261728
"kernelspec": {
1727-
"display_name": "Python 3 (ipykernel)",
1729+
"display_name": "python3",
17281730
"language": "python",
17291731
"name": "python3"
17301732
}

01_actions.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@
720720
],
721721
"metadata": {
722722
"kernelspec": {
723-
"display_name": "Python 3 (ipykernel)",
723+
"display_name": "python3",
724724
"language": "python",
725725
"name": "python3"
726726
}

02_auth.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@
395395
],
396396
"metadata": {
397397
"kernelspec": {
398-
"display_name": "Python 3 (ipykernel)",
398+
"display_name": "python3",
399399
"language": "python",
400400
"name": "python3"
401401
}

03_page.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@
651651
],
652652
"metadata": {
653653
"kernelspec": {
654-
"display_name": "Python 3",
654+
"display_name": "python3",
655655
"language": "python",
656656
"name": "python3"
657657
}

04_event.ipynb

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

10_cli.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@
549549
],
550550
"metadata": {
551551
"kernelspec": {
552-
"display_name": "Python 3",
552+
"display_name": "python3",
553553
"language": "python",
554554
"name": "python3"
555555
}

50_fullapi.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@
10271027
],
10281028
"metadata": {
10291029
"kernelspec": {
1030-
"display_name": "Python 3 (ipykernel)",
1030+
"display_name": "python3",
10311031
"language": "python",
10321032
"name": "python3"
10331033
}

90_build_lib.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
],
221221
"metadata": {
222222
"kernelspec": {
223-
"display_name": "Python 3 (ipykernel)",
223+
"display_name": "python3",
224224
"language": "python",
225225
"name": "python3"
226226
}

examples/_create_examples.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
],
4949
"metadata": {
5050
"kernelspec": {
51-
"display_name": "Python 3",
51+
"display_name": "python3",
5252
"language": "python",
5353
"name": "python3"
5454
}

examples/build.py

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
#!/usr/bin/env python
12
from ghapi.build_lib import *
23
build_funcs()

0 commit comments

Comments
 (0)