Skip to content
No description, website, or topics provided.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
msdn
tests
.gitignore
LICENSE
README.md
setup.py

README.md

msdn

msdn is Mastodon api for python.
This api is implemented by refering to sixohsix's api "Twitter"

Requirements

  • Python 3.6.7

Installation

  1. Cloning this repository
$ git clone https://github.com/AltTether/msdn.git
  1. Installing by python
$ python3 setup.py install

Now, It has only this way to install.
I would provide other way.

Example

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",...}

License

msdn is licensed under the MIT license.
Copyright (c) 2018 AltT

You can’t perform that action at this time.