Latest
Search
K
Links
Comment on page

PostBuilder

Type parameters

Raw: RawResponse‹any, any›

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new PostBuilder(httpClient: HttpClient, uri: string): PostBuilder
Parameters:
Name
Type
httpClient
HttpClient
uri
string
Returns: PostBuilder

Properties

Optional attributes

attributes? : undefined | object

Optional id

id? : undefined | string

Protected limit

limit: number = DEFAULT_RESOURCE_LIMIT
Inherited from RequestBuilder.limit

Protected offset

offset: undefined | number
Inherited from RequestBuilder.offset

Protected options

options: Options
Inherited from RequestBuilder.options

Protected page

page: number = 1
Inherited from RequestBuilder.page

Protected queryParams

queryParams: Record‹string, string›
Inherited from RequestBuilder.queryParams

Optional relationships

relationships? : Record‹string, object›

Protected resolveIncludedRelationships

resolveIncludedRelationships: boolean = false

Protected sortParams

sortParams: string[] = []
Inherited from RequestBuilder.sortParams

Optional type

type? : undefined | string

uri

uri: string
Inherited from RequestBuilder.uri

Accessors

parameters

get parameters(): Record‹string, string›
Inherited from RequestBuilder.parameters
Returns: Record‹string, string›

Methods

filter

filter(key: string | string[] | undefined, value: string | number | boolean | undefined, operator?: FilterOperator): this
Inherited from RequestBuilder.filter
Parameters:
Name
Type
key
string | string[] | undefined
value
string | number | boolean | undefined
operator?
Returns: this

ofType

ofType(type: string): this
Parameters:
Name
Type
type
string
Returns: this

pageLimit

pageLimit(limit: number): this
Inherited from RequestBuilder.pageLimit
Parameters:
Name
Type
limit
number
Returns: this

pageNumber

pageNumber(page: number | string | undefined): this
Inherited from RequestBuilder.pageNumber
Parameters:
Name
Type
page
number | string | undefined
Returns: this

pageOffset

pageOffset(offset: number): this
Inherited from RequestBuilder.pageOffset
Parameters:
Name
Type
offset
number
Returns: this

parameter

parameter(key: string, value: string | number | boolean | undefined): this
Inherited from RequestBuilder.parameter
Parameters:
Name
Type
key
string
value
string | number | boolean | undefined
Returns: this

Protected parseResponse

parseResponse<Raw>(response: HttpResponse): Promise‹JsonResponse‹Raw››
Inherited from RequestBuilder.parseResponse
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

send

send(options: HttpOptions): Promise‹JsonResponse‹Raw››
Overrides RequestBuilder.send
Parameters:
Name
Type
Default
options
HttpOptions
{}
Returns: Promise‹JsonResponse‹Raw››

sort

sort(key: string | undefined, order: SortOrder): this
Inherited from RequestBuilder.sort
Parameters:
Name
Type
key
string | undefined
order
SortOrder
Returns: this

withAttributes

withAttributes(attributes: object): this
Parameters:
Name
Type
attributes
object
Returns: this

withId

withId(id: string): this
Parameters:
Name
Type
id
string
Returns: this

withRelationship

withRelationship(rel?: undefined | object): this
Parameters:
Name
Type
rel?
undefined | object
Returns: this