Skip to content

Commit e43b950

Browse files
committed
table
1 parent 7e671d5 commit e43b950

File tree

2 files changed

+42
-133
lines changed

2 files changed

+42
-133
lines changed

04_event.ipynb

Lines changed: 14 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@
4343
"api = GhApi()"
4444
]
4545
},
46-
{
47-
"cell_type": "code",
48-
"execution_count": null,
49-
"metadata": {},
50-
"outputs": [],
51-
"source": [
52-
"# TODO only new events"
53-
]
54-
},
5546
{
5647
"cell_type": "code",
5748
"execution_count": null,
@@ -98,24 +89,17 @@
9889
]
9990
},
10091
{
101-
"cell_type": "code",
102-
"execution_count": null,
92+
"cell_type": "markdown",
10393
"metadata": {},
104-
"outputs": [
105-
{
106-
"data": {
107-
"text/plain": [
108-
"(240, 'fastai')"
109-
]
110-
},
111-
"execution_count": null,
112-
"metadata": {},
113-
"output_type": "execute_result"
114-
}
115-
],
11694
"source": [
117-
"ev = api.list_events_parallel(org='fastai')\n",
118-
"len(ev),ev[0].org.login"
95+
"`list_events` and `list_events_parallel` support the following:\n",
96+
"\n",
97+
"|Events from|Example|\n",
98+
"|:-|:-|\n",
99+
"|Organization|`api.list_events_parallel(org='fastai')`\n",
100+
"|User|`api.list_events_parallel(username='jph00')`\n",
101+
"|Repository network|`api.list_events_parallel(owner='fastai', repo='fastcore')`\n",
102+
"|All public|`api.list_events_parallel()`"
119103
]
120104
},
121105
{
@@ -142,33 +126,7 @@
142126
"cell_type": "code",
143127
"execution_count": null,
144128
"metadata": {},
145-
"outputs": [
146-
{
147-
"name": "stdout",
148-
"output_type": "stream",
149-
"text": [
150-
"\n",
151-
"*** 60\n",
152-
"14505512015 14505511995 14505511993 14505511981 14505511975 14505511976 14505511971 14505511970 14505511968 14505511963 14505511921 14505511920 14505511889 \n",
153-
"*** 28\n",
154-
"14505512077 14505512069 14505512063 14505512061 14505512053 14505512051 14505512048 14505512040 14505512034 \n",
155-
"*** 38\n",
156-
"14505512248 14505512218 14505512215 14505512210 14505512198 14505512092 \n",
157-
"*** 41\n",
158-
"14505512340 14505512326 14505512325 14505512314 14505512313 14505512315 14505512311 14505512304 14505512307 14505512289 14505512277 14505512271 14505512261 14505512257 \n",
159-
"*** 43\n",
160-
"14505512456 14505512454 14505512450 14505512445 14505512429 14505512427 14505512408 14505512403 14505512395 14505512380 14505512366 14505512362 14505512355 14505512353 \n",
161-
"*** 32\n",
162-
"14505512515 14505512505 14505512504 14505512495 14505512486 14505512477 14505512458 \n",
163-
"*** 38\n",
164-
"14505512598 14505512600 14505512582 14505512566 14505512558 14505512549 14505512538 14505512530 14505512523 \n",
165-
"*** 60\n",
166-
"14505512763 14505512761 14505512740 14505512727 14505512723 14505512720 14505512716 14505512712 14505512709 14505512705 14505512701 14505512688 14505512679 14505512668 14505512669 14505512666 14505512655 \n",
167-
"*** 42\n",
168-
"14505512843 14505512838 14505512841 14505512839 14505512835 14505512833 14505512831 14505512809 14505512811 14505512803 14505512800 "
169-
]
170-
}
171-
],
129+
"outputs": [],
172130
"source": [
173131
"for o in islice(fetch_events('PullRequestEvent'), 100): print(o.id, end=' ')"
174132
]
@@ -228,12 +186,13 @@
228186
"Converted 00_core.ipynb.\n",
229187
"Converted 01_actions.ipynb.\n",
230188
"Converted 02_auth.ipynb.\n",
189+
"Converted 03_page.ipynb.\n",
190+
"Converted 04_event.ipynb.\n",
231191
"Converted 10_cli.ipynb.\n",
232192
"Converted 50_fullapi.ipynb.\n",
193+
"Converted 80_tutorial_actions.ipynb.\n",
233194
"Converted 90_build_lib.ipynb.\n",
234-
"Converted Untitled.ipynb.\n",
235-
"Converted index.ipynb.\n",
236-
"Converted tutorial_actions.ipynb.\n"
195+
"Converted index.ipynb.\n"
237196
]
238197
}
239198
],

docs/event.html

Lines changed: 28 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,6 @@
5050
</div>
5151
</div>
5252

53-
</div>
54-
{% endraw %}
55-
56-
{% raw %}
57-
58-
<div class="cell border-box-sizing code_cell rendered">
59-
<div class="input">
60-
61-
<div class="inner_cell">
62-
<div class="input_area">
63-
<div class=" highlight hl-ipython3"><pre><span></span>
64-
</pre></div>
65-
66-
</div>
67-
</div>
68-
</div>
69-
7053
</div>
7154
{% endraw %}
7255

@@ -141,40 +124,38 @@ <h4 id="GhApi.list_events_parallel" class="doc_header"><code>GhApi.list_events_p
141124
</div>
142125
{% endraw %}
143126

144-
{% raw %}
145-
146-
<div class="cell border-box-sizing code_cell rendered">
147-
<div class="input">
127+
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
128+
<div class="text_cell_render border-box-sizing rendered_html">
129+
<p><code>list_events</code> and <code>list_events_parallel</code> support the following:</p>
130+
<table>
131+
<thead><tr>
132+
<th style="text-align:left">Events from</th>
133+
<th style="text-align:left">Example</th>
134+
</tr>
135+
</thead>
136+
<tbody>
137+
<tr>
138+
<td style="text-align:left">Organization</td>
139+
<td style="text-align:left"><code>api.list_events_parallel(org='fastai')</code></td>
140+
</tr>
141+
<tr>
142+
<td style="text-align:left">User</td>
143+
<td style="text-align:left"><code>api.list_events_parallel(username='jph00')</code></td>
144+
</tr>
145+
<tr>
146+
<td style="text-align:left">Repository network</td>
147+
<td style="text-align:left"><code>api.list_events_parallel(owner='fastai', repo='fastcore')</code></td>
148+
</tr>
149+
<tr>
150+
<td style="text-align:left">All public</td>
151+
<td style="text-align:left"><code>api.list_events_parallel()</code></td>
152+
</tr>
153+
</tbody>
154+
</table>
148155

149-
<div class="inner_cell">
150-
<div class="input_area">
151-
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">ev</span> <span class="o">=</span> <span class="n">api</span><span class="o">.</span><span class="n">list_events_parallel</span><span class="p">(</span><span class="n">org</span><span class="o">=</span><span class="s1">&#39;fastai&#39;</span><span class="p">)</span>
152-
<span class="nb">len</span><span class="p">(</span><span class="n">ev</span><span class="p">),</span><span class="n">ev</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">org</span><span class="o">.</span><span class="n">login</span>
153-
</pre></div>
154-
155-
</div>
156156
</div>
157157
</div>
158-
159-
<div class="output_wrapper">
160-
<div class="output">
161-
162-
<div class="output_area">
163-
164-
165-
166-
<div class="output_text output_subarea output_execute_result">
167-
<pre>(240, &#39;fastai&#39;)</pre>
168-
</div>
169-
170-
</div>
171-
172-
</div>
173-
</div>
174-
175158
</div>
176-
{% endraw %}
177-
178159
{% raw %}
179160

180161
<div class="cell border-box-sizing code_cell rendered">
@@ -221,37 +202,6 @@ <h4 id="fetch_events" class="doc_header"><code>fetch_events</code><a href="https
221202
</div>
222203
</div>
223204

224-
<div class="output_wrapper">
225-
<div class="output">
226-
227-
<div class="output_area">
228-
229-
<div class="output_subarea output_stream output_stdout output_text">
230-
<pre>
231-
*** 60
232-
14505512015 14505511995 14505511993 14505511981 14505511975 14505511976 14505511971 14505511970 14505511968 14505511963 14505511921 14505511920 14505511889
233-
*** 28
234-
14505512077 14505512069 14505512063 14505512061 14505512053 14505512051 14505512048 14505512040 14505512034
235-
*** 38
236-
14505512248 14505512218 14505512215 14505512210 14505512198 14505512092
237-
*** 41
238-
14505512340 14505512326 14505512325 14505512314 14505512313 14505512315 14505512311 14505512304 14505512307 14505512289 14505512277 14505512271 14505512261 14505512257
239-
*** 43
240-
14505512456 14505512454 14505512450 14505512445 14505512429 14505512427 14505512408 14505512403 14505512395 14505512380 14505512366 14505512362 14505512355 14505512353
241-
*** 32
242-
14505512515 14505512505 14505512504 14505512495 14505512486 14505512477 14505512458
243-
*** 38
244-
14505512598 14505512600 14505512582 14505512566 14505512558 14505512549 14505512538 14505512530 14505512523
245-
*** 60
246-
14505512763 14505512761 14505512740 14505512727 14505512723 14505512720 14505512716 14505512712 14505512709 14505512705 14505512701 14505512688 14505512679 14505512668 14505512669 14505512666 14505512655
247-
*** 42
248-
14505512843 14505512838 14505512841 14505512839 14505512835 14505512833 14505512831 14505512809 14505512811 14505512803 14505512800 </pre>
249-
</div>
250-
</div>
251-
252-
</div>
253-
</div>
254-
255205
</div>
256206
{% endraw %}
257207

0 commit comments

Comments
 (0)