RequestBuilder

Type parameters

ResponseType

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

Protected constructor

+ new RequestBuilder(uri: string, options: Options): RequestBuilder

Parameters:

Name

Type

uri

string

options

Returns: RequestBuilder

Properties

Protected limit

limit: number = DEFAULT_RESOURCE_LIMIT

Protected offset

offset: undefined | number

Protected options

options: Options

Protected page

page: number = 1

Protected queryParams

queryParams: Record‹string, string›

Protected resolveIncludedRelationships

resolveIncludedRelationships: boolean = false

Protected sortParams

sortParams: string[] = []

uri

uri: string

Accessors

parameters

get parameters(): Record‹string, string›

Returns: Record‹string, string›

Methods

filter

filter(key: string | string[] | undefined, value: string | number | boolean | undefined, operator?: FilterOperator): this

Parameters:

Name

Type

key

string | string[] | undefined

value

string | number | boolean | undefined

Returns: this

pageLimit

pageLimit(limit: number): this

Parameters:

Name

Type

limit

number

Returns: this

pageNumber

pageNumber(page: number | string | undefined): this

Parameters:

Name

Type

page

number | string | undefined

Returns: this

pageOffset

pageOffset(offset: number): this

Parameters:

Name

Type

offset

number

Returns: this

parameter

parameter(key: string, value: string | number | boolean | undefined): this

Parameters:

Name

Type

key

string

value

string | number | boolean | undefined

Returns: this

Protected parseResponse

parseResponse<Raw>(response: HttpResponse): Promise‹JsonResponse‹Raw››

Type parameters:

Raw: RawResponse‹any, any›

Parameters:

Name

Type

response

HttpResponse

Returns: Promise‹JsonResponse‹Raw››

resolveIncluded

resolveIncluded(resolveIncluded?: undefined | false | true): this

Parameters:

Name

Type

resolveIncluded?

undefined | false | true

Returns: this

Abstract send

send(options?: HttpOptions): Promise‹ResponseType›

Parameters:

Name

Type

options?

HttpOptions

Returns: Promise‹ResponseType›

sort

sort(key: string | undefined, order: SortOrder): this

Parameters:

Name

Type

key

string | undefined

Returns: this

Last updated