Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ThirdPartyAccount

Account associated with a third-party Site.

Hierarchy

Implements

  • IDbStorable

Index

Constructors

constructor

Properties

createdAt

createdAt: Date = ...

id

id: string

rev

rev: string = ''

site

site: Site

Abstract type

userName

userName: string

Static accountCache

accountCache: DbCache<ThirdPartyAccount> = ...

Static resultCache

resultCache: DbCache<ThirdPartyAccount> = ...

Accessors

url

  • get url(): string

Static accounts

  • get accounts(): {}
  • Map of accounts that are an instance of this class.

    Returns {}

    • [key: string]: T

Static results

  • get results(): {}
  • Map of results that are an instance of this class.

    Returns {}

    • [key: string]: T

Methods

remove

  • remove(): Promise<void>

save

  • save(): Promise<Response>
  • Save/update this account in the database.

    Don't call this unless you've made changes! Each call will create a revision and take up space.

    Returns Promise<Response>

serialize

  • serialize(): AccountSchema

Static deserialize

  • Factory method for deserializing an account of any type.

    Also contains deserialization steps shared by all ThirdPartyAccounts.

    Derived classes MUST override this and call it with instance defined. Failure to do so will result in an infinite loop of:

    derived.deserialize() -> super.deserialize() -> factory() ->
    derived.deserialize() -> super.deserialize() -> factory() -> ...
    

    Parameters

    Returns Promise<ThirdPartyAccount>

Static factory

Static loadAll

  • Load all Accountss from the database into the ThirdPartyAccount.accountCache.

    Returns an array of the requested accounts. All loaded accounts (including ones not loaded by this request) can be accessed via ThirdPartyAccount.accountCache.

    Parameters

    • Optional idPrefix: string

    Returns Promise<ThirdPartyAccount[]>

Generated using TypeDoc