Handles post related API requests

Constructors

Properties

auth: default

The AuthService for this instance

Methods

  • Fetch the latest Posts

    Parameters

    • Optional settings: {
          latitude?: number;
          longitude?: number;
          page?: number;
          range?: number;
      }

      An object containing settings for the query

      • Optional latitude?: number
      • Optional longitude?: number
      • Optional page?: number
      • Optional range?: number

    Returns Promise<null | PostResponse>

    Example

    `let x = await client.posts.getNearby();`
    

    Example

    `let x = await client.posts.getNearby({latitude: 37.42342342342342, longitude: -122.08395287867832, range: 5, page: 5});`
    
  • Create a Post

    Parameters

    • options: {
          font: string;
          ip: string;
          isNsfw: boolean;
          latitude: number;
          longitude: number;
          mediaType?: string;
          mediaUrl: string;
          tagId: any;
          text: string;
      }

      The options to use when creating the Post

      • font: string
      • ip: string
      • isNsfw: boolean
      • latitude: number
      • longitude: number
      • Optional mediaType?: string
      • mediaUrl: string
      • tagId: any
      • text: string

    Returns Promise<boolean>

  • Reply to a Post

    Parameters

    • postId: string

      The Post#id to reply to

    • text: string

      The reply to send

    • font: string

      The font this should be rendered in

    Returns Promise<boolean>

Generated using TypeDoc