aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst34
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
157User dicts 157User 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
190Toot dicts 192Toot 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
223Mention dicts 227Mention 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
234Hashtag dicts 240Hashtag 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
243Emoji dicts 251Emoji 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
253Relationship dicts 263Relationship 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
269Notification dicts 281Notification 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
284Context dicts 298Context 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
295Media dicts 311Media 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
319Card dicts 337Card 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
343Search result dicts 363Search 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
355Instance dicts 377Instance 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
370Report dicts 394Report 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
434This function allows you to access the timelines a logged in 461This function allows you to access the timelines a logged in
435user could see, as well as hashtag timelines and the public timeline. 462user 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
443Reading data: Statuses 472Reading data: Statuses
@@ -518,6 +547,7 @@ Writing data: Statuses
518These functions allow you to post statuses to Mastodon and to 547These functions allow you to post statuses to Mastodon and to
519interact with already posted statuses. 548interact 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
562media IDs (Up to 4 at the same time) can then be used with post_status 592media IDs (Up to 4 at the same time) can then be used with post_status
563to attach media to statuses. 593to attach media to statuses.
564 594
595.. _media_post():
596
565.. automethod:: Mastodon.media_post 597.. automethod:: Mastodon.media_post
566 598
567Writing data: Reports 599Writing data: Reports
Powered by cgit v1.2.3 (git 2.41.0)