witchie/toot/__init__.py
Ivan Habunek d5b5c89996
Add support for custom instance domains
The instance domain can be different from their base url, for example
the instance at https://social.vivaldi.net uses the vivaldi.net domain,
sans 'social'.

This commit requires the user to provide the base url of the instance,
instead of domain name. The domain is then fetched from the server.

fixes #217
2023-03-09 11:00:45 +01:00

11 lines
352 B
Python

from collections import namedtuple
__version__ = '0.35.0'
App = namedtuple('App', ['instance', 'base_url', 'client_id', 'client_secret'])
User = namedtuple('User', ['instance', 'username', 'access_token'])
DEFAULT_INSTANCE = 'https://mastodon.social'
CLIENT_NAME = 'toot - a Mastodon CLI client'
CLIENT_WEBSITE = 'https://github.com/ihabunek/toot'