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

Full Type: string

No Description

_headersobject

Full Type: {}

No Description

getRequestfunction

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

No Description

_apiobject

Full Type: XboxWebApi

No Description

_defaultHeadersobject

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

No Description

_disableAuthHeaderboolean

Full Type: boolean

No Description

getApifunction

Full Type: () => XboxWebApi

No Description

resetDefaultHeadersfunction

Full Type: () => boolean

No Description

applyPaginationfunction

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

No Description

getfunction

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

No Description

deletefunction

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

No Description

postfunction

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

No Description

putfunction

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

No Description