pincer.objects.user.connection   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 21
dl 0
loc 58
rs 10
c 0
b 0
f 0
1
# Copyright Pincer 2021-Present
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
from __future__ import annotations
5
6
from dataclasses import dataclass, MISSING
7
from typing import TYPE_CHECKING
8
9
from ...utils.api_object import APIObject
10
11
if TYPE_CHECKING:
12
    from typing import List
13
14
    from .user import VisibilityType
15
    from .integration import Integration
16
    from ...utils.types import APINullable
17
18
19
@dataclass(repr=False)
20
class Connection(APIObject):
0 ignored issues
show
best-practice introduced by
Too many instance attributes (9/7)
Loading history...
21
    """The connection object that the user has attached.
22
23
    Attributes
24
    ----------
25
    id: :class:`str`
26
        Id of the connection account
27
    name: :class:`str`
28
        The username of the connection account
29
    type: :class:`str`
30
        The service of the connection (twitch, YouTube)
31
    verified: :class:`bool`
32
        Whether the connection is verified
33
    friend_sync: :class:`bool`
34
        Whether friend sync is enabled for this connection
35
    show_activity: :class:`bool`
36
        Whether activities related to this connection
37
        will be shown in presence updates
38
    visibility: :class:`~pincer.objects.user.user.VisibilityType`
39
        If the connection is visible
40
    revoked: APINullable[:class:`bool`]
41
        Whether the connection is revoked
42
    integrations: APINullable[List[:class:`~pincer.objects.user.integration.Integration`]]
43
        An array of partial server integrations
44
    """
45
46
    # noqa: E501
47
48
    id: str
49
    name: str
50
    type: str
51
    verified: bool
52
    friend_sync: bool
53
    show_activity: bool
54
    visibility: VisibilityType
55
56
    revoked: APINullable[bool] = MISSING
57
    integrations: APINullable[List[Integration]] = MISSING
58