Skip to content

Commit

Permalink
Note about IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
halcy committed Nov 25, 2016
1 parent 3585830 commit 10eda36
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,22 @@ as a single python module. By default, it talks to the
`Mastodon flagship instance`_, but it can be set to talk to any
node running Mastodon.

A note about IDs
----------------
Mastodons API uses IDs in several places: User IDs, Toot IDs, ...

While debugging, it might be tempting to copy-paste in IDs from the
web interface into your code. This will not work, as the IDs on the web
interface and in the URLs are not the same as the IDs used internally
in the API, so don't do that.

Return values
-------------

Unless otherwise specified, all data is returned as python
dictionaries, matching the JSON format used by the API.

User dicts
~~~~~~~~~~

.. code-block:: python
{
Expand Down Expand Up @@ -90,7 +97,6 @@ Toot dicts
Relationship dicts
~~~~~~~~~~~~~~~~~~
.. code-block:: python
mastodon.account_follow(<numerical id>)
Expand All @@ -104,7 +110,6 @@ Relationship dicts
Context dicts
~~~~~~~~~~~~~
.. code-block:: python
mastodon.status_context(<numerical id>)
Expand All @@ -116,7 +121,6 @@ Context dicts
Media dicts
~~~~~~~~~~~
.. code-block:: python
mastodon.media_post("image.jpg", "image/jpeg")
Expand All @@ -128,8 +132,6 @@ Media dicts
'url': The URL for the media
}
App registration and user authentication
----------------------------------------
Before you can use the mastodon API, you have to register your
Expand Down

0 comments on commit 10eda36

Please sign in to comment.