Class PipedAPI

Hierarchy

  • PipedAPI

Constructors

Properties

host: string

Methods

  • Retrieves data from the specified URL.

    Parameters

    • url: string

      The URL from which to retrieve data.

    Returns Promise<any>

    • A Promise that resolves to the parsed JSON data.
  • Retrieves a channel by its ID.

    Parameters

    • id: string

      The ID of the channel to retrieve.

    • Optional nextpage: string

      The JSON encoded nextpage variable, to be sent as a query string (optional).

    Returns Promise<Channel | NextPageChannel>

    A Promise that resolves to the retrieved Channel object.

  • Retrieves a channel by its name.

    Parameters

    • name: string

      The name of the channel.

    Returns Promise<Channel>

    A promise that resolves to the channel object.

  • Retrieves comments for a specific video.

    Parameters

    • videoId: string

      The ID of the video for which to retrieve comments.

    • Optional nextpage: string

      The JSON encoded nextpage variable, to be sent as a query string (optional).

    Returns Promise<Comments>

    A Promise that resolves to the comments for the video.

  • Retrieves a playlist based on its ID.

    Parameters

    • id: string

      The ID of the playlist to retrieve.

    • Optional nextpage: string

      The token for the next page of results (optional).

    Returns Promise<Playlist | NextPagePlaylist>

    A Promise that resolves to a Playlist or NextPagePlaylist object.

  • Searches videos for a given query with an optional filter.

    Parameters

    • query: string

      The query to search for.

    • Optional filter: string = "all"

      The optional filter to apply.

    Returns Promise<Search>

    • A Promise that resolves to the search results.
  • Retrieves sponsors based on the provided ID and category.

    Parameters

    • id: string

      The ID of the video.

    • category: string[] = ...

      The category of sponsors you would like to skip. Example: ["sponsor"].

    Returns Promise<Sponsors>

    A promise that resolves to the sponsors.

  • Retrieves the streams for a given video ID.

    Parameters

    • videoId: string

      The ID of the video.

    Returns Promise<Streams>

    A promise that resolves to the streams for the given video ID.

  • Retrieves suggestions based on the given query.

    Parameters

    • query: string

      The query string to search for suggestions.

    Returns Promise<string[]>

    A promise that resolves to an array of string suggestions.

  • Retrieves the trending videos for a specific region.

    Parameters

    • region: string

      The region for which to retrieve trending videos.

    Returns Promise<Video[]>

    • A promise that resolves to an array of Video objects representing the trending videos.
  • Retrieves a user by their name.

    Parameters

    • name: string

      The name of the user.

    Returns Promise<Channel>

    A Promise that resolves to the user's channel.

Generated using TypeDoc