Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KitsuAnimePage

Hierarchy

Implements

Index

Constructors

constructor

Properties

backgroundPages

backgroundPages: Map<any, ServicePage<Kitsu>>

ServicePages which are running as a child of the current page.

Protected internalMemory

internalMemory: Namespace

memory

service

service: Kitsu

state

state: State<Kitsu>

Methods

_getEpisodesWatched

  • _getEpisodesWatched(): Promise<number | undefined>

_load

  • _load(): Promise<void>

Protected _setEpisodesWatched

  • _setEpisodesWatched(progress: number): Promise<boolean>

Protected _unload

  • _unload(): Promise<void>

Protected assignMemory

buildAnimeSearchDialog

  • buildAnimeSearchDialog(): Promise<Element>

buildAnimeStatusBar

  • buildAnimeStatusBar(): Promise<Element>

canSetEpisodesWatched

  • canSetEpisodesWatched(): Promise<boolean>

canSubscribeAnime

  • canSubscribeAnime(): Promise<boolean>

canSubscribeAnime$

  • canSubscribeAnime$(): Promise<Observable<boolean>>

forget

  • forget(key: string, forgetNamespace?: undefined | false | true): void
  • Delete the value of the provided namespace key.

    Parameters

    • key: string
    • Optional forgetNamespace: undefined | false | true

      if true this operation behaves like Memory.resetMemory with the key as an argument. Otherwise it merely removes the specified namespace.

    Returns void

getAccessToken

  • getAccessToken(): Promise<string | undefined>

getAnime

getAnimeId

  • getAnimeId(): Promise<string | undefined>

getAnimeIdentifier

  • getAnimeIdentifier(): Promise<string | undefined>

getAnimeSearchQuery

  • getAnimeSearchQuery(): Promise<string | undefined>

getAnimeUID

  • getAnimeUID(forceSearch?: undefined | false | true): Promise<string | undefined>
  • Get the UID of the Anime. This method will return the stored UID (if available) unless forceSearch is true.

    Parameters

    • Optional forceSearch: undefined | false | true

      Ignore the stored UID.

    Returns Promise<string | undefined>

    undefined if there were no results or the AnimePage.getAnimeSearchQuery was empty

getAnimeURL

  • getAnimeURL(): Promise<string | undefined>

getBackgroundPage

getEpisodeCount

  • getEpisodeCount(): Promise<number | undefined>

getEpisodeURL

  • getEpisodeURL(episode: number): Promise<string>

getEpisodesWatched

  • getEpisodesWatched(): Promise<number | undefined>

getEpisodesWatched$

  • getEpisodesWatched$(): Promise<BehaviorSubject<number | undefined>>

getKitsuAnimeInfo

getLibraryEntryId

  • getLibraryEntryId(): Promise<string | null>

getStoredAnimeInfo

getSubscribed$

  • getSubscribed$(): Promise<Observable<boolean> | undefined>

getSubscription

getUserId

  • getUserId(): Promise<string | null>

injectAnimeSearchDialog

  • injectAnimeSearchDialog(searchDialog: Element): Promise<void>

injectAnimeStatusBar

  • injectAnimeStatusBar(element: Element): Promise<void>

injected

  • injected(el: Node, ns?: undefined | string): void

isSubscribed

  • isSubscribed(): Promise<boolean | undefined>

load

  • load(): Promise<void>

openAnimeSearchDialog

  • openAnimeSearchDialog(onClose?: undefined | function): Promise<void>

registerBackgroundPage

reload

  • reload(): Promise<void>

remember

  • remember(key: string, value: any): void
  • Store the given value under the namespace key.

    Parameters

    • key: string

      Namespaces are separated by a dot

    • value: any

    Returns void

removeInjected

  • removeInjected(...namespaces: string[]): void
  • Remove all elements from the given namespaces. Removing elements of a namespace also removes all elements in namespaces further down.

    If no namespaces provided removes all elements.

    Parameters

    • Rest ...namespaces: string[]

    Returns void

resetMemory

  • resetMemory(...namespaces: string[]): void
  • Reset the given namespaces and all their children.

    When called with no arguments this flushes the entire memory (i.e. deletes all keys).

    see

    Memory.forget to remove a specific namespace without affecting its children.

    Parameters

    • Rest ...namespaces: string[]

    Returns void

resetPage

  • resetPage(): void

setAnimeUID

  • setAnimeUID(uid: string | AnimeInfo): Promise<void>

setEpisodesWatched

  • setEpisodesWatched(progress: number): Promise<boolean>

showEpisode

  • showEpisode(episodeIndex: number): Promise<boolean>

subscribeAnime

  • subscribeAnime(): Promise<boolean>

transitionTo

unload

  • unload(): Promise<void>

unsubscribeAnime

  • unsubscribeAnime(): Promise<boolean>

updateSubscription

  • updateSubscription(episodesWatched?: number | PromiseLike<number>): Promise<void>

Generated using TypeDoc