aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.rst92
1 files changed, 46 insertions, 46 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 43e30b1..121dc83 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -85,47 +85,47 @@ User dicts
85~~~~~~~~~~ 85~~~~~~~~~~
86.. code-block:: python 86.. code-block:: python
87 87
88 mastodon.account(<numerical id>) 88 mastodon.account(<numerical id>)
89 # Returns the following dictionary: 89 # Returns the following dictionary:
90 { 90 {
91 'display_name': The user's display name 91 'display_name': The user's display name
92 'acct': The user's account name as username@domain (@domain omitted for local users) 92 'acct': The user's account name as username@domain (@domain omitted for local users)
93 'following_count': How many people they follow 93 'following_count': How many people they follow
94 'url': Their URL; usually 'https://mastodon.social/users/<acct>' 94 'url': Their URL; usually 'https://mastodon.social/users/<acct>'
95 'statuses_count': How many statuses they have 95 'statuses_count': How many statuses they have
96 'followers_count': How many followers they have 96 'followers_count': How many followers they have
97 'avatar': URL for their avatar 97 'avatar': URL for their avatar
98 'note': Their bio 98 'note': Their bio
99 'header': URL for their header image 99 'header': URL for their header image
100 'id': Same as <numerical id> 100 'id': Same as <numerical id>
101 'username': The username (what you @ them with) 101 'username': The username (what you @ them with)
102 } 102 }
103 103
104Toot dicts 104Toot dicts
105~~~~~~~~~~ 105~~~~~~~~~~
106.. code-block:: python 106.. code-block:: python
107 107
108 mastodon.toot("Hello from Python") 108 mastodon.toot("Hello from Python")
109 # Returns the following dictionary: 109 # Returns the following dictionary:
110 { 110 {
111 'sensitive': Denotes whether the toot is marked sensitive 111 'sensitive': Denotes whether the toot is marked sensitive
112 'created_at': Creation time 112 'created_at': Creation time
113 'mentions': A list of account dicts mentioned in the toot 113 'mentions': A list of account dicts mentioned in the toot
114 'uri': Descriptor for the toot 114 'uri': Descriptor for the toot
115 EG 'tag:mastodon.social,2016-11-25:objectId=<id>:objectType=Status' 115 EG 'tag:mastodon.social,2016-11-25:objectId=<id>:objectType=Status'
116 'tags': A list of hashtag dicts used in the toot 116 'tags': A list of hashtag dicts used in the toot
117 'in_reply_to_id': Numerical id of the toot this toot is in response to 117 'in_reply_to_id': Numerical id of the toot this toot is in response to
118 'media_attachments': list of media dicts of attached files. Only present 118 'media_attachments': list of media dicts of attached files. Only present
119 when there are attached files. 119 when there are attached files.
120 'id': Numerical id of this toot 120 'id': Numerical id of this toot
121 'reblogs_count': Number of reblogs 121 'reblogs_count': Number of reblogs
122 'favourites_count': Number of favourites 122 'favourites_count': Number of favourites
123 'reblog': Denotes whether the toot is a reblog 123 'reblog': Denotes whether the toot is a reblog
124 'url': URL of the toot 124 'url': URL of the toot
125 'content': Content of the toot, as HTML: '<p>Hello from Python</p>' 125 'content': Content of the toot, as HTML: '<p>Hello from Python</p>'
126 'favourited': Denotes whether the logged in user has favourited this toot 126 'favourited': Denotes whether the logged in user has favourited this toot
127 'account': Account dict for the logged in account 127 'account': Account dict for the logged in account
128 } 128 }
129 129
130Relationship dicts 130Relationship dicts
131~~~~~~~~~~~~~~~~~~ 131~~~~~~~~~~~~~~~~~~
@@ -134,10 +134,10 @@ Relationship dicts
134 mastodon.account_follow(<numerical id>) 134 mastodon.account_follow(<numerical id>)
135 # Returns the following dictionary: 135 # Returns the following dictionary:
136 { 136 {
137 'followed_by': Boolean denoting whether they follow you back 137 'followed_by': Boolean denoting whether they follow you back
138 'following': Boolean denoting whether you follow them 138 'following': Boolean denoting whether you follow them
139 'id': Numerical id (same one as <numerical id>) 139 'id': Numerical id (same one as <numerical id>)
140 'blocking': Boolean denoting whether you are blocking them 140 'blocking': Boolean denoting whether you are blocking them
141 } 141 }
142 142
143Notification dicts 143Notification dicts
@@ -161,8 +161,8 @@ Context dicts
161 mastodon.status_context(<numerical id>) 161 mastodon.status_context(<numerical id>)
162 # Returns the following dictionary: 162 # Returns the following dictionary:
163 { 163 {
164 'descendants': A list of toot dicts 164 'descendants': A list of toot dicts
165 'ancestors': A list of toot dicts 165 'ancestors': A list of toot dicts
166 } 166 }
167 167
168Media dicts 168Media dicts
@@ -172,10 +172,10 @@ Media dicts
172 mastodon.media_post("image.jpg", "image/jpeg") 172 mastodon.media_post("image.jpg", "image/jpeg")
173 # Returns the following dictionary: 173 # Returns the following dictionary:
174 { 174 {
175 'text_url': The display text for the media (what shows up in toots) 175 'text_url': The display text for the media (what shows up in toots)
176 'preview_url': The URL for the media preview 176 'preview_url': The URL for the media preview
177 'type': Media type, EG 'image' 177 'type': Media type, EG 'image'
178 'url': The URL for the media 178 'url': The URL for the media
179 } 179 }
180 180
181App registration and user authentication 181App registration and user authentication
Powered by cgit v1.2.3 (git 2.41.0)