Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HashtagsAPI

HashtagsAPI - Prodivdes methods to interface with hashtag API endpoints

Hierarchy

Index

Constructors

constructor

Properties

Protected _api

Protected _endpoint

_endpoint: string

Protected _headers

_headers: object

Protected _okuna

_okuna: Client

Defines an API request.

param

Protected _params

_params: RequestParams

Protected _paths

_paths: string[] = []

Protected _url

_url: string

requiresToken

requiresToken: boolean = true

Methods

_constructFormdata

  • _constructFormdata(opts?: object | null): FormData
  • constructFormdata() Constructs a FormData instance from an object.

    Parameters

    • Default value opts: object | null = null

      the object to generate the FormData from

    Returns FormData

Protected delete

  • delete(): Promise<any>

generateHeaders

  • generateHeaders(contentType?: string | null): object
  • generateHeaders() A function used to generate the headers that need to be passed to the request performee.

    Parameters

    • Default value contentType: string | null = null

    Returns object

Protected get

  • get(): Promise<any>

getHashtagWithName

  • getHashtagWithName(name: string, authenticatedRequest?: boolean): Promise<any>
  • GET /api/hashtags/:name - promises to get a hashtag by name

    Parameters

    • name: string

      the name of the hashtag

    • Default value authenticatedRequest: boolean = true

      specifies whether the current session is authenticated

    Returns Promise<any>

getHashtagsWithQuery

  • getHashtagsWithQuery(query: string, authenticatedRequest?: boolean): Promise<any>
  • GET /api/hashtags/search - promises to search for hashtags

    Parameters

    • query: string

      the search query

    • Default value authenticatedRequest: boolean = true

      specifies whether the current session is authenticated

    Returns Promise<any>

getPostsForHashtagWithName

getSuggestedHashtags

  • getSuggestedHashtags(authenticatedRequest?: boolean): Promise<any>
  • GET /api/hashtags/suggested - promises to retrieve the suggested hashtags

    Parameters

    • Default value authenticatedRequest: boolean = true

      specifies whether the current session is authenticated

    Returns Promise<any>

getTrendingHashtags

  • getTrendingHashtags(authenticatedRequest?: boolean): Promise<any>
  • GET /api/hashtags/trending - promises to retrieve the trending hashtags

    Parameters

    • Default value authenticatedRequest: boolean = true

      specifies whether the current session is authenticated

    Returns Promise<any>

Protected patch

  • patch(body: object): Promise<any>

Protected patchFormdata

  • patchFormdata(body: object): Promise<any>

Protected post

  • post(body: object): Promise<any>

Protected postFormdata

  • postFormdata(body: object): Promise<any>

Protected put

  • put(body: object): Promise<any>

Protected putFormdata

  • putFormdata(body: object): Promise<any>

reportHashtagWithName

  • POST /api/hashtags/:name/report - promises to report a hashtag

    Parameters

    Returns Promise<any>

Generated using TypeDoc