Xbox-Webapi-Node
Provider

RestProvider

RestProvider Class

Example code

// Retrieve achievements of a user
const result = await api.providers.rest.getRequest('https://achievements.xboxlive.com/users/xuid(<xuid>)/history/titles')

// The response has a continuationToken. We can call .next() to retrieve the next page
const result2 = await result.next()

// Print out page 2 of the achievements api call
console.log(result2)

default

_endpointstring

No Description

_headers{}

No Description

getRequest(url: string, xblContractVersion?: number | undefined, continuationToken?: string | undefined, maxItems?: undefined, skipItems?: undefined) => Promise<HttpResponse<any>>

No Description

_apiXboxWebApi

No Description

_defaultHeaders{ 'Accept-Language': string; Accept: string; 'x-xbl-contract-version': string; 'Content-Type': string; }

No Description

_disableAuthHeaderboolean

No Description

getApi() => XboxWebApi

No Description

resetDefaultHeaders() => boolean

No Description

applyPagination(path: string, maxItems: any, skipItems: any, continuationToken: string | undefined) => string

No Description

get(path: any, headers?: any) => Promise<HttpResponse<any>>

No Description

delete(path: any, data: any, headers?: any) => Promise<HttpResponse<any>>

No Description

post(path: any, data: any, headers?: any) => Promise<HttpResponse<any>>

No Description

put(path: any, data: any, headers?: any) => Promise<HttpResponse<any>>

No Description