msdn is Mastodon api for python.
This api is implemented by refering to sixohsix's api "Twitter"
- Python 3.6.7
- Cloning this repository
$ git clone https://github.com/AltTether/msdn.git
- Installing by python
$ python3 setup.py install
Now, It has only this way to install.
I would provide other way.
For example, if you want to use web api of endpoint "/v1/api/accounts/verify_credentials" in mstdn.jp instance,
you need to prepare access_token in the instance, and using this code.
>>> from msdn import Msdn
>>> base_uri = 'https://mstdn.jp'
>>> token = 'MASTODON_YOUR_ACCESS_TOKEN'
>>> msdn = Msdn(base_uri, token)
>>> response = msdn.accounts.verify_credentials()
>>> response.text
{"id":"YOUR_ID","username":"YOUR_USERNAME","acct":"YOUR_ACCT","display_name":"YOUR_DISPLAY_NAME",...}
msdn is licensed under the MIT license.
Copyright (c) 2018 AltT