A client wrapper for the Spigot XenforoResourceManagerAPI.

Hierarchy

  • Spigot

Constructors

  • Constructor for the Spigot client.

    Parameters

    • baseUrl: string = "https://api.spigotmc.org/simple/0.2/index.php"

      The base URL of the Spigot API.

    Returns Spigot

Properties

_axios: AxiosInstance

The axios instance used to make requests.

Methods

  • Find a specific author by name.

    Parameters

    • name: string

      The name of the author.

    Returns Promise<undefined | Author>

    A promise resolving the author. Resolves to undefined if the author does not exist.

  • Get a specific author.

    Parameters

    • authorId: number

      The id of the author.

    Returns Promise<undefined | Author>

    A promise resolving the author. Resolves to undefined if the author does not exist.

  • Get a specific resource by its ID.

    Parameters

    • resourceId: number

      The id of the resource.

    Returns Promise<undefined | Resource>

    A promise resolving the resource. Resolves to undefined if the resource does not exist.

  • Get a specific resource update by its ID.

    Parameters

    • updateId: number

      The id of the update.

    Returns Promise<undefined | ResourceUpdate>

    A promise resolving the update. Resolves to undefined if the update does not exist.

  • Get a list of updates for a specific resource.

    Parameters

    • resourceId: number

      The id of the resource.

    • Optional page: number

      The page.

    Returns Promise<ResourceUpdate[]>

    A promise resolving to a list of updates.

  • Get a list of resources. The results are paginated.

    Parameters

    • Optional categoryId: number

      The id of the category to get the resources from.

    • Optional page: number

      The page.

    Returns Promise<Resource[]>

    A promise resolving the resources.

  • Get the resources of the given author. The results are paginated.

    Parameters

    • authorId: number

      The id of the author.

    • Optional page: number

      The page.

    Returns Promise<Resource[]>

    Resolves to a list of resources.

Generated using TypeDoc