Constructor
new Endpoint(baseopt , stickiesopt )
Normally you'll create an instance of this class indirectly by interfacing with the API. You can retrieve this class object with call to Endpoints.module();
Parameters:
Name
Type
Attributes
Description
base
Object
<optional>
Properties
Name
Type
Attributes
Description
baseUrl
String
<optional>
The basic url, usually with {name} that is replaced by interpolation
oauth
String
|
Object
<optional>
set to "{oauth='me'}" to automatically work with user's account
discovery
Object
<optional>
stickies
Object
<optional>
permanent values for options
Properties
Name
Type
Attributes
Description
stickyHeaders
Object
<optional>
permanent headers for any created requests
stickyQuery
Object
<optional>
permanent queries on any created requests
payload
Object
<optional>
payload for any created requests
Source:
Methods
createRequest(method, base, optionsopt , advancedopt ) → {Request }
Creates any http request. Used by the http* methods.
Parameters:
Name
Type
Attributes
Description
method
String
base
Object
Properties
Name
Type
Attributes
Description
url
String
<optional>
pathParams
Object
<optional>
replace ${placeholders} by key/values found in baseUrl
options
Object
<optional>
Properties
Name
Type
Attributes
Description
query
Object
<optional>
payload
Object
<optional>
headers
Object
<optional>
advanced
Object
<optional>
Properties
Name
Type
Attributes
Description
mixin
Any
<optional>
mixin pattern on request object
Source:
getBaseUrl()
An endpoint's baseUrl property is a string with placeholders
Source:
httpdelete(pathParams, optionsopt ) → {Request }
Creates http delete request
Parameters:
Name
Type
Attributes
Description
pathParams
Object
replace ${placeholders} by key/values
options
Object
<optional>
Properties
Name
Type
Attributes
Description
query
Object
<optional>
payload
Object
<optional>
headers
Object
<optional>
Source:
httpget(pathParams, optionsopt ) → {Request }
Parameters:
Name
Type
Attributes
Description
pathParams
Object
replace ${placeholders} by key/values
options
Object
<optional>
Properties
Name
Type
Attributes
Description
query
Object
<optional>
payload
Object
<optional>
headers
Object
<optional>
Source:
httppatch(pathParams, optionsopt ) → {Request }
Creates http patch request
Parameters:
Name
Type
Attributes
Description
pathParams
Object
replace ${placeholders} by key/values
options
Object
<optional>
Properties
Name
Type
Attributes
Description
query
Object
<optional>
payload
Object
<optional>
headers
Object
<optional>
Source:
httppost(pathParams, optionsopt ) → {Request }
Creates http post request
Parameters:
Name
Type
Attributes
Description
pathParams
Object
replace ${placeholders} by key/values
options
Object
<optional>
Properties
Name
Type
Attributes
Description
query
Object
<optional>
payload
Object
<optional>
headers
Object
<optional>
Source:
httpput(pathParams, optionsopt ) → {Request }
Parameters:
Name
Type
Attributes
Description
pathParams
Object
replace ${placeholders} by key/values
options
Object
<optional>
Properties
Name
Type
Attributes
Description
query
Object
<optional>
payload
Object
<optional>
headers
Object
<optional>
Source: