Identity
A provider account the supporter signed in with.
Class in sponsorkit.models.
from sponsorkit import IdentityAlso importable from sponsorkit.models.
@dataclass(frozen=True)
class Identity:
...A provider account the supporter signed in with.
Constructor#
Identity(provider: Provider, id: str, handle: str | None, needs_reconnect: bool) -> NoneInstances are immutable; every field below is a constructor parameter.
Fields#
provider#
provider: Providergithub or open-collective.
id#
id: strThe provider's id for the account.
handle#
handle: str | NoneThe provider login or slug, when known.
needs_reconnect#
needs_reconnect: boolThe provider token expired; sign_in(provider=...) reconnects it.
Methods#
from_dict()#
@classmethod
def from_dict(cls, d: Mapping[str, Any]) -> IdentityParse the JSON form.
to_dict()#
def to_dict(self) -> dict[str, Any]The JSON form.