Mapcreator
Extends:
Base API class
Constructor Summary
Public Constructor | ||
public |
constructor(auth: OAuth | string, host: string) |
Member Summary
Public Members | ||
public get |
Get authentication provider instance |
|
public set |
Set authentication provider instance |
|
public get |
authenticated: boolean: * Test if the client is authenticated with the api and has a valid token |
|
public get |
Choropleth accessor |
|
public get |
colors: ResourceProxy<Color>: * Color accessor |
|
public get |
Contract accessor |
|
public get |
Dimension set accessor |
|
public get |
Dimension accessor |
|
public get |
faqs: ResourceProxy<Faq>: * Faq accessor |
|
public get |
Featured jobs accessor |
|
public get |
features: ResourceProxy<Feature>: * Feature accessor |
|
public get |
FontFamily accessor |
|
public get |
fonts: ResourceProxy<Font>: * Font accessor |
|
public get |
Highlight accessor |
|
public get |
The current host |
|
public set |
The remote host |
|
public get |
InsetMap accessor |
|
public get |
JobShare accessor |
|
public get |
jobTypes: ResourceProxy<JobType>: * JobType accessor |
|
public get |
jobs: ResourceProxy<Job>: * Job accessor |
|
public get |
Mapcreator ky instance This ky instance takes care of the API communication. |
|
public get |
Language accessor |
|
public get |
LayerFaq accessor |
|
public get |
Layer group accessor |
|
public get |
layers: ResourceProxy<Layer>: * Layer accessor |
|
public get |
Get logger instance |
|
public get |
MapstyleSet accessor |
|
public get |
Mapstyle accessor |
|
public get |
messages: ResourceProxy<Message>: * Message accessor |
|
public get |
Notification accessor |
|
public get |
Organisation accessor |
|
public get |
Permission accessor |
|
public get |
Product tour step accessor |
|
public get |
Product tour accessor |
|
public get |
roles: ResourceProxy<Role>: * Role accessor |
|
public get |
svgSets: ResourceProxy<SvgSet>: * SvgSet accessor |
|
public get |
svgs: ResourceProxy<Svg>: * Svg accessor |
|
public get |
tagTypes: ResourceProxy<TagType>: * Tag accessor |
|
public get |
tags: ResourceProxy<Tag>: * Tag accessor |
|
public get |
|
|
public get |
users: ResourceProxy<User>: * User accessor |
|
public get |
VectorChoropleth accessor |
|
public get |
VectorHighlight accessor |
|
public get |
Get api version |
Method Summary
Public Methods | ||
public |
async authenticate(): Promise<Mapcreator> Authenticate with the api using the authentication method provided. |
|
public |
Get font styles |
|
public |
Get SVG set types |
|
public |
Forget the current session This will clean up any stored OAuth states stored using StateContainer and any OAuth tokens stored |
|
public |
Saves the session token so that it can be recovered at a later time. |
|
public |
static(Target: string | Class, Constructor: Class?): ResourceProxy Static proxy generation |
|
public |
wrapKy(wrapper: *, args: ...*) |
Public Constructors
Public Members
public get authenticated: boolean: * source
Test if the client is authenticated with the api and has a valid token
public get ky: function: * source
Mapcreator ky instance This ky instance takes care of the API communication. It has the following responsibilities:
- Send authenticated requests to the API
- Transform errors returned from the API into ApiError and ValidationError if possible
- Wait when the rate limiter responds with a 429 and retry later
- Prefix urls with the api domain if needed
See:
- https://github.com/sindresorhus/ky
public get productTourSteps: ResourceProxy<ProductTourStep>: * source
Product tour step accessor
See:
public get vectorChoropleths: GeoResourceProxy<VectorChoropleth>: * source
VectorChoropleth accessor
See:
public get vectorHighlights: GeoResourceProxy<VectorHighlight>: * source
VectorHighlight accessor
See:
Public Methods
public async authenticate(): Promise<Mapcreator> source
Authenticate with the api using the authentication method provided.
Throw:
If the api returns errors |
public getFontStyles(): CancelablePromise<Enum> source
Get font styles
Throw:
If the api returns errors |
See:
public getSvgSetTypes(): CancelablePromise<Enum> source
Get SVG set types
Throw:
If the api returns errors |
See:
public logout(): CancelablePromise source
Forget the current session This will clean up any stored OAuth states stored using StateContainer and any OAuth tokens stored
Throw:
If the api returns errors |
public saveToken(name: string) source
Saves the session token so that it can be recovered at a later time. The wrapper can find the token most of the time if the name parameter is left blank.
Params:
Name | Type | Attribute | Description |
name | string | name of the token |
public static(Target: string | Class, Constructor: Class?): ResourceProxy source
Static proxy generation
Params:
Name | Type | Attribute | Description |
Target | string | Class | Constructor or url |
|
Constructor | Class? | Constructor for a resource that the results should be cast to |
Example:
api.static('/custom/resource/path/{id}/').get(123);
class FooBar extends ResourceBase {
static get resourceName() {
return 'custom';
}
}
api.static(FooBar)
.get(1)
.then(console.log);
api.static('/foo-bar-custom', FooBar).lister();
public wrapKy(wrapper: *, args: ...*) source
Params:
Name | Type | Attribute | Description |
wrapper | * | ||
args | ...* |