Gráfico de commits

265 commits

Autor SHA1 Mensaje Fecha
Lorenz Diener
b18b6f201b Merge pull request #89 from Elizafox/exception-hierarchy
Redesign exception hierarchy
2017-10-02 10:13:23 +02:00
Lorenz Diener
15fe471df3 Merge pull request #88 from Elizafox/master
Properly fix redirecting streaming endpoints.
2017-10-02 10:12:13 +02:00
Elizabeth Myers
c64617ee94 Redesign exception hierarchy
All Mastodon.py errors now derive from MastodonError, for easier
catching in application code that just wants to see if something
happened, and isn't too miffed about the details.

I/O Errors derive from MastodonIOError, for similar reasons.

This change is designed to be backwards compatible.
2017-09-25 19:11:16 -05:00
Elizabeth Myers
9ec0655365 Properly fix redirecting streaming endpoints.
Fixes #84
2017-09-25 18:01:41 -05:00
Lorenz Diener
6ab283d17e Merge pull request #86 from Elizafox/master
Fix notifications_dismiss by passing parameter correctly
2017-09-25 13:24:53 +02:00
Elizabeth Myers
67018b2249 Fix notifications_dismiss by passing parameter correctly 2017-09-18 09:59:35 -05:00
Lorenz Diener
b6b503a1a9 Merge pull request #85 from Elizafox/master
Workaround Mastodon issue with streaming API redirection
2017-09-17 18:00:38 +02:00
Elizabeth Myers
5b90a3c830 Remove debugging print statements 2017-09-16 10:09:32 -05:00
Elizabeth Myers
6067aa4604 Workaround Mastodon issue with streaming API redirection
Mastodon can be configured to use another address for streaming
server-side. Such a setup is common with certain deployments.

However, due to a bug, Mastodon does not properly issue HTTP redirects
for anything but the endpoint /api/v1/streaming (including subdirs). It
instead gives a 404, causing the request to fail.

The workaround is to hit this path first, checking for any redirects,
and modifying the URL accordingly.

This commit also includes a workaround for behaviour in requests that
causes it to strip the Authorization header from redirected requests.
This is intentional behaviour on the part of requests, but breaks the
redirection done by Mastodon.

Fixes #84
2017-09-16 10:05:44 -05:00
Lorenz Diener
99249d153b Update DEVELOPMENT.md
change a single character so tag gets shoved at readthedocs
2017-09-10 23:33:56 +02:00
Lorenz Diener
9847d9b2c0 Changelog 1.1.1 2017-09-10 23:27:35 +02:00
Lorenz Diener
4b7174faca Maintenance release 2017-09-10 17:05:57 +02:00
Lorenz Diener
bd855a931c Merge pull request #83 from codl/1.1.0-fix-log-in
fix exception in log_in, by accepting json dates as timestamps
2017-09-10 17:00:27 +02:00
codl
92dd24450d
fix exception in log_in, by accepting json dates as timestamps
when requesting a bearer token, mastodon (more specifically doorkeeper)
returns an object with a created_at attribute which is a plain timestamp
unlike in most of mastodon's api:

{
    "access_token": "hunter2",
    "token_type": "bearer",
    "scope": "read write",
    "created_at": 1504824250,
}
2017-09-10 12:23:54 +02:00
Lorenz Diener
1af914c8b8 Update DEVELOPMENT.md 2017-09-08 18:43:54 +02:00
Lorenz Diener
d7e7df3f9e Update README.rst
Also, please pick up on my new tag, readthedocs
2017-09-08 17:45:22 +02:00
Lorenz Diener
7ded08fd84 Fix for fix 2017-09-08 16:41:39 +02:00
Lorenz Diener
419bedc55a Potential fix for #81 2017-09-08 16:40:43 +02:00
Lorenz Diener
a93a1abcd3 Prepare for release 1.1.0 2017-09-08 16:38:03 +02:00
Lorenz Diener
e052ca1ae9 Updated development info 2017-09-08 16:37:08 +02:00
Lorenz Diener
6d62607b33 Update changelog 2017-09-08 16:34:18 +02:00
Lorenz Diener
517f47083d Add conversation muting 2017-09-08 16:34:11 +02:00
Lorenz Diener
84b463ce1d Update documentation 2017-09-08 16:27:28 +02:00
Lorenz Diener
982fde2b56 Add date parsing 2017-09-08 16:27:16 +02:00
Lorenz Diener
9badbce67b Update docs about notifications 2017-09-08 15:26:05 +02:00
Lorenz Diener
df26310d1b Add notification dismissal 2017-09-08 15:25:49 +02:00
Lorenz Diener
81e2b4b4ab Change default ratelimit back to 300 2017-09-08 15:06:31 +02:00
Lorenz Diener
4fbeb7245f Merge pull request #69 from Chronister/async_streaming
Add async parameter to streaming API calls.
2017-09-08 15:03:15 +02:00
Lorenz Diener
7de02fe5b8 Merge branch 'master' into async_streaming 2017-09-08 15:02:58 +02:00
Lorenz Diener
0edc424b11 Clarify visibility documentation 2017-09-08 14:51:07 +02:00
Lorenz Diener
c628ff4f05 Small documentation fix for toot() 2017-09-08 14:49:57 +02:00
Lorenz Diener
d9471c2d7d Merge pull request #80 from foxmask/master
not pep8 compliant - issue 71
2017-09-08 13:45:00 +02:00
Lorenz Diener
74cb10eeff Merge branch 'master' into master 2017-09-08 13:44:30 +02:00
Lorenz Diener
e56bf7b6e1 Merge pull request #82 from lambadalambda/patch-1
Send params as part of the query in GET requests
2017-09-08 13:43:20 +02:00
lambadalambda
71d1038b32 Send params as part of the query in GET requests
Using the data argument will send them form-encoded like for the other requests, which isn't parsed by many servers for GET requests.
2017-09-08 07:45:23 +02:00
FoxMaSk
6ef2724f66 not pep8 compliant #71 2017-09-05 23:07:24 +02:00
FoxMaSk
e0e68ccd6a not pep8 compliant #71 2017-09-05 22:59:32 +02:00
Lorenz Diener
c8490be2a7 Streams are requested via GET (Fixes #50) 2017-09-05 16:45:24 +02:00
Lorenz Diener
1c93e350f7 Fix crash on URLs with no 'rel' attribute (Fixes #79) 2017-09-05 16:39:17 +02:00
Lorenz Diener
87ee1df1c0 Fix #59 2017-09-05 16:36:32 +02:00
Lorenz Diener
613ad895c8 Fix copy-paste errors in fetch_* methods (fixes #57) 2017-09-05 16:33:13 +02:00
Lorenz Diener
02d9f5196c Fix fetch_* methods modifying their parameters 2017-09-05 16:19:27 +02:00
Lorenz Diener
75ffe55cb7 Merge branch 'master' of https://github.com/halcy/Mastodon.py 2017-09-05 16:12:06 +02:00
Lorenz Diener
e3a754acf9 Merge pull request #77 from codl/patch-1
setup.py: fix dateutil name
2017-09-05 15:47:34 +02:00
codl
e9591099ba
setup.py: fix dateutil name 2017-08-23 09:51:01 +02:00
Lorenz Diener
bd6f5f418e Merge pull request #76 from Elizafox/master
Remove trailing slashes in base URL
2017-08-21 16:29:25 +02:00
Lorenz Diener
badc8aff20 Fixing setup.py 2017-08-21 16:26:02 +02:00
Elizabeth Myers
a76eafbd46 Remove trailing slashes in base URL
The streaming API can't handle multiple slashes in the lead of a path
request. This is probably a bug in Mastodon, but should be worked around
here for now.
2017-08-19 05:49:08 -05:00
Chronister
4a5302e03a Return a one-off handle instead of the Response object 2017-08-13 18:10:04 -07:00
Chronister
a6a1ddbed1 Add async parameter to streaming API calls. If true, calls the streaming API on a separate thread and returns the Response object to the user so they can close it at their discretion. 2017-08-12 22:21:37 -07:00