Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Tarkov

Tarkov API Wrapper

Hierarchy

  • Tarkov

Index

Constructors

constructor

Properties

Private api

api: Api

Private hwid

hwid: Hwid

itemsList

itemsList: ItemsList

localization

localization: Localization

profile

profile: Profile

profiles

profiles: ProfileData[] = []

traders

traders: Trader[]

Accessors

gameVersion

  • get gameVersion(): string

launcherVersion

  • get launcherVersion(): string

session

  • get session(): { queued: boolean; session: string }
  • set session(session: { queued: boolean; session: string }): void
  • Returns { queued: boolean; session: string }

    • queued: boolean
    • session: string
  • Parameters

    • session: { queued: boolean; session: string }
      • queued: boolean
      • session: string

    Returns void

Methods

Private activateHardware

  • activateHardware(email: string, twoFactor: string): Promise<void>
  • Activates a new HWID with a 2fa code

    Parameters

    • email: string

      Account Email

    • twoFactor: string

      2FA Code from email

    Returns Promise<void>

collectItem

  • collectItem(itemId: string, stashId: string, attachmentId: string): Promise<any>
  • Collect an item UNTESTED

    async

    Parameters

    • itemId: string

      collect item id

    • stashId: string

      players stashId. Get it from profile.inventory.stash

    • attachmentId: string

      attachments id

    Returns Promise<any>

Private exchangeAccessToken

  • exchangeAccessToken(access_token: string): Promise<boolean>
  • Exchanges the access token for a session id

    Parameters

    • access_token: string

      JWT from @login

    Returns Promise<boolean>

Private generateHwid

  • generateHwid(): Hwid

getI18n

getItems

getMessageAttachments

getMessages

  • getMessages(type?: undefined | number): Promise<Messages[]>

getProfiles

getTrader

getTraders

  • getTraders(): Promise<Trader[]>

getWeather

keepAlive

  • keepAlive(): Promise<any>

login

  • login(email: string, password: string, twoFactor?: undefined | string): Promise<void | { data: Data; err: number; errmsg: string }>
  • Create a new tarkov session

    beta

    Parameters

    • email: string

      Tarkov Account Email

    • password: string

      Tarkov Account Password

    • Optional twoFactor: undefined | string

      twoFactor activation code sent to your account email

    Returns Promise<void | { data: Data; err: number; errmsg: string }>

moveItem

  • Move an item UNTESTED

    async

    Parameters

    • itemId: string

      collect item id

    • destination: ItemDestination

      info where to move. {id, container, location:{x,y,r} }

    Returns Promise<any>

offerItem

  • offerItem(items: string[], requirements: { _tpl: string; price: number }, sellAll?: boolean): Promise<any>
  • Offer a list of items

    async

    Parameters

    • items: string[]

      Array of item ids

    • requirements: { _tpl: string; price: number }
      • _tpl: string
      • price: number
    • Default value sellAll: boolean = false

      Sell all in one piece. Default false

    Returns Promise<any>

searchMarket

  • Search offers from Flea Market.

    async

    Parameters

    • page: number

      starting page, example: start searching from page 0.

    • limit: number

      limit how many results to show. Example: 15.

    • filter: MarketFilter

      Market Filter

    Returns Promise<MarketOffers>

selectProfile

stackItem

  • stackItem(fromId: string, toId: string): Promise<any>
  • Stack an item UNTESTED

    async

    Parameters

    • fromId: string

      id of item to move

    • toId: string

      id of item to move onto

    Returns Promise<any>

Generated using TypeDoc