Commit graph

9 commits

Author SHA1 Message Date
95ca5f755d Fix User-Agent header, timeouts, and JSON error handling
mediawiki_oauth: set User-Agent on all OAuth1Session instances so
Wikimedia doesn't reject token and API requests with 403; add timeout
parameter to api_post_request (default 4s).

mediawiki_api: add APIError exception; wrap .json() in call() to raise
APIError with status code and response body on decode failure; raise
timeout to 30s for edit POSTs.

api: wrap call_get_diff .json() with the same JSONDecodeError guard,
raising MediawikiError with HTTP status and body on failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 18:11:23 +01:00
479dc864fd Remove debugging output 2023-12-09 18:43:05 +00:00
14d8539298 Link matching improvements 2023-12-09 18:42:53 +00:00
1da620875a Add type hints and docstrings 2023-12-09 18:42:03 +00:00
d76c74395b Fix name of module 2023-12-06 20:56:59 +00:00
2c267c67e2 Add types and docstrings 2023-12-06 11:30:34 +00:00
ea95c82b37 Rename wikidata_oauth to mediawiki_oauth 2023-12-06 11:29:03 +00:00
39f9ba31ed Raise LoginNeeded if not logged in 2023-12-06 09:53:06 +00:00
f07b407e7a Initial commit 2023-10-04 12:56:21 +01:00