File: defaults.py

package info (click to toggle)
python-mastodon 2.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,836 kB
  • sloc: python: 9,438; makefile: 206; sql: 98; sh: 27
file content (66 lines) | stat: -rw-r--r-- 1,892 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# defaults.py - default values for various parameters

_DEFAULT_TIMEOUT = 300
_DEFAULT_STREAM_TIMEOUT = 300
_DEFAULT_STREAM_RECONNECT_WAIT_SEC = 5
_DEFAULT_USER_AGENT = "mastodonpy"
_DEFAULT_SCOPES = ['read', 'write', 'follow', 'push']
_SCOPE_SETS = {
    'read': [
        'read:accounts',
        'read:blocks',
        'read:favourites',
        'read:filters',
        'read:follows',
        'read:lists',
        'read:mutes',
        'read:notifications',
        'read:search',
        'read:statuses',
        'read:bookmarks'
    ],
    'write': [
        'write:accounts',
        'write:blocks',
        'write:favourites',
        'write:filters',
        'write:follows',
        'write:lists',
        'write:media',
        'write:mutes',
        'write:notifications',
        'write:reports',
        'write:statuses',
        'write:bookmarks'
    ],
    'follow': [
        'read:blocks',
        'read:follows',
        'read:mutes',
        'write:blocks',
        'write:follows',
        'write:mutes',
    ],
    'admin:read': [
        'admin:read:accounts',
        'admin:read:reports',
        'admin:read:domain_allows',
        'admin:read:domain_blocks',
        'admin:read:ip_blocks',
        'admin:read:email_domain_blocks',
        'admin:read:canonical_email_blocks',
    ],
    'admin:write': [
        'admin:write:accounts',
        'admin:write:reports',
        'admin:write:domain_allows',
        'admin:write:domain_blocks',
        'admin:write:ip_blocks',
        'admin:write:email_domain_blocks',
        'admin:write:canonical_email_blocks',
    ],
    'profile': []
}
_VALID_SCOPES = ['read', 'write', 'follow', 'push', 'admin:read', 'admin:write', 'profile'] + \
    _SCOPE_SETS['read'] + _SCOPE_SETS['write'] + \
    _SCOPE_SETS['admin:read'] + _SCOPE_SETS['admin:write']