The doc router for the Guilded REST API.

Example

new DocRouter(rest);

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Create a doc on Guilded.

    Returns

    The created doc.

    Example

    docs.create('abc', 'My Doc', 'This is my doc.');
    

    Parameters

    • channelId: string

      The ID of the channel the doc belongs to.

    • title: string

      The title of the doc.

    • content: string

      The content of the doc.

    Returns Promise<APIDoc>

  • Delete a doc from Guilded.

    Example

    docs.delete('abc', 123);
    

    Parameters

    • channelId: string

      The ID of the channel the doc belongs to.

    • docId: number

      The ID of the doc to delete.

    Returns Promise<void>

  • Edit a doc on Guilded.

    Returns

    The edited doc.

    Example

    docs.edit('abc', 123, 'My Doc', 'This is my doc.');
    

    Parameters

    • channelId: string

      The ID of the channel the doc belongs to.

    • docId: number

      The ID of the doc to edit.

    • title: string

      The title of the doc.

    • content: string

      The content of the doc.

    Returns Promise<APIDoc>

  • Fetch a doc from Guilded.

    Returns

    The fetched doc.

    Example

    docs.fetch('abc', 123);
    

    Parameters

    • channelId: string

      The ID of the channel the doc belongs to.

    • docId: number

      The ID of the doc to fetch.

    Returns Promise<APIDoc>

  • Fetch docs from Guilded.

    Returns

    The fetched docs.

    Example

    docs.fetchMany('abc');
    

    Parameters

    • channelId: string

      The ID of the channel the docs belong to.

    • Optional options: APIDocFetchManyOptions

      The options to fetch docs with.

    Returns Promise<APIDoc[]>