diff options
author | Lorenz Diener <[email protected]> | 2017-12-13 18:40:17 +0100 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2017-12-13 18:40:17 +0100 |
commit | 7d2f2441269fda71b72322825b5813a2aec4c7bd (patch) | |
tree | 9784c20d119b623051edec0d78251de08c9bfa18 /docs | |
parent | d7d8f153a31b76493daf68a44e01d4c4e11b180d (diff) | |
download | mastodon.py-7d2f2441269fda71b72322825b5813a2aec4c7bd.tar.gz |
Add internal links in docs
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/docs/index.rst b/docs/index.rst index da670b1..0c05321 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -156,6 +156,8 @@ and are parsed into python datetime objects. | |||
156 | 156 | ||
157 | User dicts | 157 | User dicts |
158 | ~~~~~~~~~~ | 158 | ~~~~~~~~~~ |
159 | .. _user dict: | ||
160 | |||
159 | .. code-block:: python | 161 | .. code-block:: python |
160 | 162 | ||
161 | mastodon.account(<numerical id>) | 163 | mastodon.account(<numerical id>) |
@@ -189,6 +191,8 @@ User dicts | |||
189 | 191 | ||
190 | Toot dicts | 192 | Toot dicts |
191 | ~~~~~~~~~~ | 193 | ~~~~~~~~~~ |
194 | .. _toot dict: | ||
195 | |||
192 | .. code-block:: python | 196 | .. code-block:: python |
193 | 197 | ||
194 | mastodon.toot("Hello from Python") | 198 | mastodon.toot("Hello from Python") |
@@ -222,6 +226,8 @@ Toot dicts | |||
222 | 226 | ||
223 | Mention dicts | 227 | Mention dicts |
224 | ~~~~~~~~~~~~~ | 228 | ~~~~~~~~~~~~~ |
229 | .. _mention dict: | ||
230 | |||
225 | .. code-block:: python | 231 | .. code-block:: python |
226 | 232 | ||
227 | { | 233 | { |
@@ -233,6 +239,8 @@ Mention dicts | |||
233 | 239 | ||
234 | Hashtag dicts | 240 | Hashtag dicts |
235 | ~~~~~~~~~~~~~ | 241 | ~~~~~~~~~~~~~ |
242 | .. _hashtag dict: | ||
243 | |||
236 | .. code-block:: python | 244 | .. code-block:: python |
237 | 245 | ||
238 | { | 246 | { |
@@ -242,6 +250,8 @@ Hashtag dicts | |||
242 | 250 | ||
243 | Emoji dicts | 251 | Emoji dicts |
244 | ~~~~~~~~~~~ | 252 | ~~~~~~~~~~~ |
253 | .. _emoji dict: | ||
254 | |||
245 | .. code-block:: python | 255 | .. code-block:: python |
246 | 256 | ||
247 | { | 257 | { |
@@ -252,6 +262,8 @@ Emoji dicts | |||
252 | 262 | ||
253 | Relationship dicts | 263 | Relationship dicts |
254 | ~~~~~~~~~~~~~~~~~~ | 264 | ~~~~~~~~~~~~~~~~~~ |
265 | .. _relationship dict: | ||
266 | |||
255 | .. code-block:: python | 267 | .. code-block:: python |
256 | 268 | ||
257 | mastodon.account_follow(<numerical id>) | 269 | mastodon.account_follow(<numerical id>) |
@@ -268,6 +280,8 @@ Relationship dicts | |||
268 | 280 | ||
269 | Notification dicts | 281 | Notification dicts |
270 | ~~~~~~~~~~~~~~~~~~ | 282 | ~~~~~~~~~~~~~~~~~~ |
283 | .. _notification dict: | ||
284 | |||
271 | .. code-block:: python | 285 | .. code-block:: python |
272 | 286 | ||
273 | mastodon.notifications()[0] | 287 | mastodon.notifications()[0] |
@@ -283,6 +297,8 @@ Notification dicts | |||
283 | 297 | ||
284 | Context dicts | 298 | Context dicts |
285 | ~~~~~~~~~~~~~ | 299 | ~~~~~~~~~~~~~ |
300 | .. _context dict: | ||
301 | |||
286 | .. code-block:: python | 302 | .. code-block:: python |
287 | 303 | ||
288 | mastodon.status_context(<numerical id>) | 304 | mastodon.status_context(<numerical id>) |
@@ -294,6 +310,8 @@ Context dicts | |||
294 | 310 | ||
295 | Media dicts | 311 | Media dicts |
296 | ~~~~~~~~~~~ | 312 | ~~~~~~~~~~~ |
313 | .. _media dict: | ||
314 | |||
297 | .. code-block:: python | 315 | .. code-block:: python |
298 | 316 | ||
299 | mastodon.media_post("image.jpg", "image/jpeg") | 317 | mastodon.media_post("image.jpg", "image/jpeg") |
@@ -318,6 +336,8 @@ Media dicts | |||
318 | 336 | ||
319 | Card dicts | 337 | Card dicts |
320 | ~~~~~~~~~~ | 338 | ~~~~~~~~~~ |
339 | .. _card dict: | ||
340 | |||
321 | .. code-block:: python | 341 | .. code-block:: python |
322 | 342 | ||
323 | mastodon.status_card(<numerical id>): | 343 | mastodon.status_card(<numerical id>): |
@@ -342,9 +362,11 @@ Card dicts | |||
342 | 362 | ||
343 | Search result dicts | 363 | Search result dicts |
344 | ~~~~~~~~~~~~~~~~~~~ | 364 | ~~~~~~~~~~~~~~~~~~~ |
365 | .. _search result dict: | ||
366 | |||
345 | .. code-block:: python | 367 | .. code-block:: python |
346 | 368 | ||
347 | mastodon.search(...) | 369 | mastodon.search("<query>") |
348 | # Returns the folowing dictionary | 370 | # Returns the folowing dictionary |
349 | { | 371 | { |
350 | 'accounts': # List of account dicts resulting from the query | 372 | 'accounts': # List of account dicts resulting from the query |
@@ -354,6 +376,8 @@ Search result dicts | |||
354 | 376 | ||
355 | Instance dicts | 377 | Instance dicts |
356 | ~~~~~~~~~~~~~~ | 378 | ~~~~~~~~~~~~~~ |
379 | .. _instance dict: | ||
380 | |||
357 | .. code-block:: python | 381 | .. code-block:: python |
358 | 382 | ||
359 | mastodon.instance() | 383 | mastodon.instance() |
@@ -369,6 +393,8 @@ Instance dicts | |||
369 | 393 | ||
370 | Report dicts | 394 | Report dicts |
371 | ~~~~~~~~~~~~ | 395 | ~~~~~~~~~~~~ |
396 | .. _report dict: | ||
397 | |||
372 | .. code-block:: python | 398 | .. code-block:: python |
373 | 399 | ||
374 | mastodon.reports()[0] | 400 | mastodon.reports()[0] |
@@ -404,6 +430,7 @@ is specified, Mastodon.py defaults to https. | |||
404 | 430 | ||
405 | .. automethod:: Mastodon.create_app | 431 | .. automethod:: Mastodon.create_app |
406 | .. automethod:: Mastodon.__init__ | 432 | .. automethod:: Mastodon.__init__ |
433 | .. _log_in(): | ||
407 | .. automethod:: Mastodon.log_in | 434 | .. automethod:: Mastodon.log_in |
408 | .. automethod:: Mastodon.auth_request_url | 435 | .. automethod:: Mastodon.auth_request_url |
409 | 436 | ||
@@ -434,10 +461,12 @@ Reading data: Timelines | |||
434 | This function allows you to access the timelines a logged in | 461 | This function allows you to access the timelines a logged in |
435 | user could see, as well as hashtag timelines and the public timeline. | 462 | user could see, as well as hashtag timelines and the public timeline. |
436 | 463 | ||
464 | .. _timeline(): | ||
437 | .. automethod:: Mastodon.timeline | 465 | .. automethod:: Mastodon.timeline |
438 | .. automethod:: Mastodon.timeline_home | 466 | .. automethod:: Mastodon.timeline_home |
439 | .. automethod:: Mastodon.timeline_local | 467 | .. automethod:: Mastodon.timeline_local |
440 | .. automethod:: Mastodon.timeline_public | 468 | .. automethod:: Mastodon.timeline_public |
469 | .. _timeline_hashtag(): | ||
441 | .. automethod:: Mastodon.timeline_hashtag | 470 | .. automethod:: Mastodon.timeline_hashtag |
442 | 471 | ||
443 | Reading data: Statuses | 472 | Reading data: Statuses |
@@ -518,6 +547,7 @@ Writing data: Statuses | |||
518 | These functions allow you to post statuses to Mastodon and to | 547 | These functions allow you to post statuses to Mastodon and to |
519 | interact with already posted statuses. | 548 | interact with already posted statuses. |
520 | 549 | ||
550 | .. _status_post(): | ||
521 | .. automethod:: Mastodon.status_post | 551 | .. automethod:: Mastodon.status_post |
522 | .. automethod:: Mastodon.toot | 552 | .. automethod:: Mastodon.toot |
523 | .. automethod:: Mastodon.status_reblog | 553 | .. automethod:: Mastodon.status_reblog |
@@ -562,6 +592,8 @@ This function allows you to upload media to Mastodon. The returned | |||
562 | media IDs (Up to 4 at the same time) can then be used with post_status | 592 | media IDs (Up to 4 at the same time) can then be used with post_status |
563 | to attach media to statuses. | 593 | to attach media to statuses. |
564 | 594 | ||
595 | .. _media_post(): | ||
596 | |||
565 | .. automethod:: Mastodon.media_post | 597 | .. automethod:: Mastodon.media_post |
566 | 598 | ||
567 | Writing data: Reports | 599 | Writing data: Reports |