Options
All
  • Public
  • Public/Protected
  • All
Menu

comicgeeks

Index

Type aliases

DateResolvable

DateResolvable: Date | string

A Date object or string in ISO 8601 format

PublisherResolvable

PublisherResolvable: number | keyof typeof Publishers

An publisher name or ID

Variables

Const Publishers

Publishers: Record<string, number> = ...

A list of supported publishers with IDs

Functions

fetchCollection

  • Fetches a user's collection, in either series or issue format

    example

    Fetch a collection in series format

    fetchCollection(122444, CollectionTypes.Series, {
     sort: SortTypes.AlphaAsc
    })
       .then(console.log)
       .catch(console.error);
    

    Parameters

    • userID: number

      The ID for the user

    • format: CollectionTypes = ...

      The format to return the results in

    • Optional options: Partial<FetchOptions>

      The options for fetching the collection

    Returns Promise<Comic[]>

fetchPulls

  • Fetches a user's pull list for a specified week

    example
    fetchPulls(122444, new Date(), {
     sort: SortTypes.AlphaAsc
    })
       .then(console.log)
       .catch(console.error);
    

    Parameters

    • userID: number

      The ID for the user

    • date: DateResolvable

      The release week, as a Date object or a string in ISO 8601 format

    • Optional options: Partial<FetchOptions>

      The options for fetching the pull list

    Returns Promise<Comic[]>

fetchReleases

  • Fetches comic releases for a specified week

    example

    Fetch the single issue releases for DC Comics with an A-Z sort

    fetchReleases(new Date(), {
         publishers: ['DC Comics'],
         filter: [
             FilterTypes.Regular,
             FilterTypes.Digital,
             FilterTypes.Annual
         ],
         sort: SortTypes.AlphaAsc
    })
       .then(console.log)
       .catch(console.error);
    

    Parameters

    • date: DateResolvable

      The release week, as a Date object or a string in ISO 8601 format

    • Optional options: Partial<FetchOptions>

      The options for fetching the releases

    Returns Promise<Comic[]>

fetchSearchResults

  • Fetches search results based on a query

    example
    fetchSearchResults('batman', CollectionTypes.Issue)
       .then(console.log)
       .catch(console.error);
    

    Parameters

    • query: string

      The query to search for

    • format: CollectionTypes = ...

      The format to return the results in

    Returns Promise<Comic[]>

fetchUser

  • fetchUser(name: string): Promise<User>
  • Fetches user details based on a user name, if they exist

    example

    Fetch a user

    fetchUser('some-user')
       .then(console.log)
       // Will error if the user is not found
       .catch(console.error);
    

    Parameters

    • name: string

      The name for the user to fetch details for

    Returns Promise<User>

fetchWishList

  • Fetches a user's wish list, in either series or issue format

    example

    Fetch a wish list in issue format

    fetchWishList(122444, CollectionTypes.Issue, {
     sort: SortTypes.AlphaAsc
    })
       .then(console.log)
       .catch(console.error);
    

    Parameters

    • userID: number

      The ID for the user

    • format: CollectionTypes = ...

      The format to return the results in

    • Optional options: Partial<FetchOptions>

      The options for fetching the wish list

    Returns Promise<Comic[]>

Generated using TypeDoc