Skip to content

Latest commit

 

History

History
1357 lines (1049 loc) · 51.7 KB

api.md

File metadata and controls

1357 lines (1049 loc) · 51.7 KB

Constants

fetchAreaObject

Get area. Check out the API docs for this endpoint here

fetchUserAreasObject

Get user areas. Check out the API docs for this endpoint here

deleteAreaPromise

Deletes an area Check out the API docs for this endpoint here

createAreaObject

Create new area. Check out the API docs for this endpoint here

updateAreaObject

Update area. Check out the API docs for this endpoint here

fetchPostsArray.<Object>

Fetchs posts from wordpress API.

fetchAllCollections

Retrieve all collections from a user Check out the API docs for this endpoint here

fetchCollection

Retrieve a specific collection Check out the API docs for this endpoint here

createCollection

Create a new collection associated to the authenticated user Check out the API docs for this endpoint here

deleteCollection

Delete an existing collection associated to the authenticated user Check out the API docs for this endpoint here

updateCollection

Update an existing collection associataed to the authenticated user Check out the API docs for this endpoint here

addResourceToCollection

Add a resource to the collection Check out the API docs for this endpoint here

removeResourceFromCollection

Remove resource from collection Check out the API docs for this endpoint here

contactUsPromise

Sends a contact form including a topic, email address, and a message. Check out the API docs for this endpoint here

fetchDashboardsArray.<Object>

Fetchs dashboards according to params. Check out the API docs for this endpoint here

fetchDashboardObject

fetchs data for a specific dashboard. Check out the API docs for this endpoint here

createDashboardObject

Creates a dashboard with the provided data. This fetch needs authentication. Check out the API docs for this endpoint here

updateDashboardObject

Updates a specified dashboard with the provided data. This fetch needs authentication. Check out the API docs for this endpoint here

deleteDashboardObject

Deletes a specified dashboard. This fetch needs authentication. Check out the API docs for this endpoint here

cloneDashboardObject

Clones a topic to convert it into a dashboard based on topic's data. This fetch needs authentication. Check out the API docs for this endpoint here

fetchDatasetsArray

Fetchs datasets according to params. Check out the API docs for this endpoint here

fetchDatasetObject

Fetches a dataset by id. Check out the API docs for this endpoint here

fetchDatasetTagsObject

Get dataset tags. Check out the API docs for this endpoint here

deleteDatasetObject

Deletes a specified dataset. This fetch needs authentication. Check out the API docs for this endpoint here

createDatasetObject

Create a Dataset. Check out the API docs for this endpoint here

updateDatasetObject

Update a Dataset. Check out the API docs for this endpoint here

updateDatasetTagsObject

Update dataset tags. Check out the API docs for this endpoint here

createMetadataObject

Creates a metadata object in the specified dataset. This methods requires authentication. Check out the API docs for this endpoint here

updateMetadataObject

Updates a metadata object in the specified dataset. This methods requires authentication. Check out the API docs for this endpoint here

fetchFavourites

Retrieve all favourites items of the user Check out the API docs for this endpoint here

createFavourite

Creates a new favourite item attached to the current user Check out the API docs for this endpoint here

deleteFavourite

Deletes an existing favourite item attached to the current user Check out the API docs for this endpoint here

fetchFieldsObject

Fetches fields for a specific dataset. Check out the API docs for this endpoint here

fetchGeostoreObject

Fetches Geostore Check out the API docs for this endpoint here

createGeostore

Create a Geostore Check out the API docs for this endpoint here

fetchCountriesArray.<Object>

Fetch countries Check out the API docs for this endpoint here

fetchCountry

Get country

fetchAllTags

Get all tags. Check out the API docs for this endpoint here

fetchInferredTags

Get inferred tags. Check out the API docs for this endpoint here

countDatasetView

Send a request to count a view to the dataset. Check out the API docs for this endpoint here

fetchMostViewedDatasetsPromise.<Array.<string>>

Get the list of most viewed datasets. Check out the API docs for this endpoint here

fetchMostFavoritedDatasets

Get the list of most favourited datasets. Check out the API docs for this endpoint here

fetchSimilarDatasets

Fetch similar datasets. Check out the API docs for this endpoint here

fetchLayersArray.<Object>

Fetchs layers according to params. Check out the API docs for this endpoint here

fetchLayerArray.<Object>

Fetches a layer according to widget id and params. Check out the API docs for this endpoint here

deleteLayerObject

Deletes a specified layer. This fetch needs authentication. Check out the API docs for this endpoint here

fetchPartnersArray.<Object>

Fetchs partners according to params.

fetchPartnerObject

fetchs data for a specific partnet.

fetchQuery

Send GET request to /query Check out the API docs for this endpoint here

fetchStaticPageArray.<Object>

Fetchs content of a specific page.

fetchSubscriptions

Get Subscriptions Check out the API docs for this endpoint here

createSubscriptionToArea

Creates a subscription for an area Check out the API docs for this endpoint here

updateSubscriptionToArea

Update Subscription Check out the API docs for this endpoint here

fetchSubscription

Get Subscription Check out the API docs for this endpoint here

deleteSubscriptionPromise

Deletes a subscription Check out the API docs for this endpoint here

fetchToolArray.<Object>

Fetchs a specific tool.

fetchTopicsArray.<Object>

Fetches topics according to params. Check out the API docs for this endpoint here

fetchTopicObject

Fetches data for a specific topic. Check out the API docs for this endpoint here

createTopicObject

Creates a topic with the provided data. This fetch needs authentication. Check out the API docs for this endpoint here

updateTopicObject

Updates a specified topic with the provided data. This fetch needs authentication. Check out the API docs for this endpoint here

deleteTopicObject

Deletes a specified topic. This fetch needs authentication. Check out the API docs for this endpoint here

loginUserObject

Logs in a user based on the email + password combination Check out the API docs for this endpoint here

forgotPasswordObject

This function sends a request to reset the user's password. It generates a token to be used in resetPassword Check out the API docs for this endpoint here

registerUserObject

Register a new user based on the email + password combination Check out the API docs for this endpoint here

resetPasswordObject

Resets the user's password. Needs the token hosted in the email sent in forgotPassword NOTE:this is NOT implemented in the API to be done from the app. right now the only way it's through the email link pointing to Control Tower. Check out the API docs for this endpoint here

uploadPhoto

Upload user photo

fetchWidgets

Fetch widgets according to params. Check out the API docs for this endpoint here

fetchWidget

Fetches data for a specific widget. Check out the API docs for this endpoint here

deleteWidget

Deletes a specified widget. This fetch needs authentication. Check out the API docs for this endpoint here

updateWidget

Updates data for the widget provided. Check out the API docs for this endpoint here

createWidget

Creates a new widget. Check out the API docs for this endpoint here

fetchWidgetMetadata

Fetches the metadata associated to the widget provided. Check out the API docs for this endpoint here

updateWidgetMetadata

Updates the metadata for the widget provided. Check out the API docs for this endpoint here

createWidgetMetadata

Creates the metadata for the widget provided. Check out the API docs for this endpoint here

Functions

getBandNames()Promise.<Array.<string>>

Return the names of the bands

getBandStatsInfo(bandName)Promise.<object>

Return the statistical information of a band

getChartInfo(widgetEditor)ChartInfo

Return the ChartInfo object for a raster chart

fetchArea ⇒ Object

Get area. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
id String Area id.
params Object Request paremeters.
headers Object Request headers.

fetchUserAreas ⇒ Object

Get user areas. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String user's token.

deleteArea ⇒ Promise

Deletes an area Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
areaId String ID of the area that will be deleted
token String User token

createArea ⇒ Object

Create new area. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
name String
geostore String Geostore ID
token String user's token

updateArea ⇒ Object

Update area. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
id String
name String Name of the new area
token String user's token.
geostore String Geostore ID

fetchPosts ⇒ Array.<Object>

Fetchs posts from wordpress API.

Kind: global constant
Returns: Array.<Object> - array of parsed posts.

Param Type Description
params Object params sent to the API.
headers Object headers sent to the API.

fetchAllCollections

Retrieve all collections from a user Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
params Object Request optional parameters

fetchCollection

Retrieve a specific collection Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
collectionId String Id of the collection we are asking for.
params Object Request parameters

createCollection

Create a new collection associated to the authenticated user Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
data Object collection data

deleteCollection

Delete an existing collection associated to the authenticated user Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
collectionId String Id of the collection to be removed

updateCollection

Update an existing collection associataed to the authenticated user Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
collectionId String Id of the collection to be edited
data Object Data to be updated

addResourceToCollection

Add a resource to the collection Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
collectionId String Id of the collection to be edited
resource Object Resource to be addded to the collection

removeResourceFromCollection

Remove resource from collection Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
collectionId String Id of the collection to be edited
resource Object Resource to be removed from the collection

contactUs ⇒ Promise

Sends a contact form including a topic, email address, and a message. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
params Object Request paremeters to API.

fetchDashboards ⇒ Array.<Object>

Fetchs dashboards according to params. Check out the API docs for this endpoint here

Kind: global constant
Returns: Array.<Object> - array of serialized dashboards.

Param Type Description
params Object Request paremeters to API.
headers Object Request headers to API.

fetchDashboard ⇒ Object

fetchs data for a specific dashboard. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized specified dashboard.

Param Type Description
id String dashboard id.

createDashboard ⇒ Object

Creates a dashboard with the provided data. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized created dashboard.

Param Type Description
body Object data provided to create the new dashboard.
token String user's token.

updateDashboard ⇒ Object

Updates a specified dashboard with the provided data. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized dashboard with updated data

Param Type Description
id String dashboard ID to be updated.
body Object data provided to update the dashboard.
token String user's token

deleteDashboard ⇒ Object

Deletes a specified dashboard. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - fetch response.

Param Type Description
id String dashboard ID to be deleted.
token String user's token.

cloneDashboard ⇒ Object

Clones a topic to convert it into a dashboard based on topic's data. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized dashboard cloned based on the ID topic.

Param Type Description
id String topic ID to be cloned.
token String user's token.

fetchDatasets ⇒ Array

Fetchs datasets according to params. Check out the API docs for this endpoint here

Kind: global constant
Returns: Array - Array of serialized datasets. be included in the response or not.

Param Type Description
params Object Request paremeters.
headers Object Request headers.
_meta boolean Boolean flag indicating whether the meta object should

fetchDataset ⇒ Object

Fetches a dataset by id. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized specified dataset.

Param Type Description
id String dataset id.
params Object params sent to the API.

fetchDatasetTags ⇒ Object

Get dataset tags. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
datasetId String dataset id.
params Object params sent to the API.

deleteDataset ⇒ Object

Deletes a specified dataset. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - fetch response.

Param Type Description
id String dataset ID to be deleted.
token String user's token.

createDataset ⇒ Object

Create a Dataset. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String user's token.
params Object params sent to the API.
headers Object headers sent to the API.

updateDataset ⇒ Object

Update a Dataset. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
id String dataset id.
token String user's token.
params Object params sent to the API.

updateDatasetTags ⇒ Object

Update dataset tags. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
datasetId String dataset id.
tags Array.<Object> user's token.
token String user's token.
usePatch boolean user's token.

createMetadata ⇒ Object

Creates a metadata object in the specified dataset. This methods requires authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized metadata object.

Param Type Description
datasetId String dataset ID where the metadata will be attached
params Object metadata object
token String user's token.

updateMetadata ⇒ Object

Updates a metadata object in the specified dataset. This methods requires authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized metadata object.

Param Type Description
datasetId String dataset ID where the metadata will be attached
params Object metadata object
token String user's token.

fetchFavourites

Retrieve all favourites items of the user Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token

createFavourite

Creates a new favourite item attached to the current user Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
options Object resourceId - Id of the resource, resourceType - resource's type (can be dataset, layer or widget)

deleteFavourite

Deletes an existing favourite item attached to the current user Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
resourceId String Id of the resource

fetchFields ⇒ Object

Fetches fields for a specific dataset. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - array of dataset fields.

Param Type Description
url String URL to get fields.

fetchGeostore ⇒ Object

Fetches Geostore Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized geostore object.

Param Type Description
id String geostore ID.

createGeostore

Create a Geostore Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
geojson Object Geojson with your geometry

fetchCountries ⇒ Array.<Object>

Fetch countries Check out the API docs for this endpoint here

Kind: global constant

fetchCountry

Get country

Kind: global constant

Param Type
iso String

fetchAllTags

Get all tags. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
params Object Request parameters to API.

fetchInferredTags

Get inferred tags. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
params Object Request parameters to API.

countDatasetView

Send a request to count a view to the dataset. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
datasetId String Dataset ID
token String User token
params Object Request parameters to API.

fetchMostViewedDatasets ⇒ Promise.<Array.<string>>

Get the list of most viewed datasets. Check out the API docs for this endpoint here

Kind: global constant
Returns: Promise.<Array.<string>> - List of sorted ids

Param Type Description
params Object Request parameters to API.

fetchMostFavoritedDatasets

Get the list of most favourited datasets. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
params Object Request parameters to API.

fetchSimilarDatasets

Fetch similar datasets. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
params Object Request parameters to API.
withAncestors boolean Flag indicating whether tags' ancestors should be considered or not

fetchLayers ⇒ Array.<Object>

Fetchs layers according to params. Check out the API docs for this endpoint here

Kind: global constant
Returns: Array.<Object> - array of serialized layers.

Param Type Description
params Object params sent to the API.
headers Object headers sent to the API.
_meta boolean should meta be in response or not

fetchLayer ⇒ Array.<Object>

Fetches a layer according to widget id and params. Check out the API docs for this endpoint here

Kind: global constant
Returns: Array.<Object> - - serialized specific layer.

Param Type Description
id String layer id.
params Object params sent to the API.

deleteLayer ⇒ Object

Deletes a specified layer. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - fetch response.

Param Type Description
layerId String layer ID to be deleted.
datasetId String dataset ID to be deleted.
token String user's token.

fetchPartners ⇒ Array.<Object>

Fetchs partners according to params.

Kind: global constant
Returns: Array.<Object> - array of serialized partners.

Param Type Description
params Object params sent to the API.

fetchPartner ⇒ Object

fetchs data for a specific partnet.

Kind: global constant
Returns: Object - serialized specified partnet.

Param Type Description
id String partnet id.

fetchQuery

Send GET request to /query Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String token User's token
sql * mandatory parameter
params Object request paremeters to API.

fetchStaticPage ⇒ Array.<Object>

Fetchs content of a specific page.

Kind: global constant
Returns: Array.<Object> - page content serialized.

Param Type Description
id String id of the page to fetch.

fetchSubscriptions

Get Subscriptions Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
token String User's token
params Object request paremeters to API.

createSubscriptionToArea

Creates a subscription for an area Check out the API docs for this endpoint here

Kind: global constant

Param Type
options Object

updateSubscriptionToArea

Update Subscription Check out the API docs for this endpoint here

Kind: global constant

Param Type
subscriptionId String
datasets *
datasetsQuery *
user Object
language String
areaId String

fetchSubscription

Get Subscription Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
subscriptionId String
token String User's token

deleteSubscription ⇒ Promise

Deletes a subscription Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
subscriptionId String of the subscription that will be deleted
token Strign User's token

fetchTool ⇒ Array.<Object>

Fetchs a specific tool.

Kind: global constant
Returns: Array.<Object> - tool serialized.

Param Type Description
id String tool id.

fetchTopics ⇒ Array.<Object>

Fetches topics according to params. Check out the API docs for this endpoint here

Kind: global constant
Returns: Array.<Object> - array of serialized topics.

Param Type Description
params Object params sent to the API.
headers- Object headers sent to the API.

fetchTopic ⇒ Object

Fetches data for a specific topic. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized specified topic.

Param Type Description
id String topic id.

createTopic ⇒ Object

Creates a topic with the provided data. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized created topic.

Param Type Description
body Object data provided to create the new topic.
token String user's token.

updateTopic ⇒ Object

Updates a specified topic with the provided data. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - serialized topic with updated data

Param Type Description
id String topic ID to be updated.
body Object data provided to update the topic.
token String user's token

deleteTopic ⇒ Object

Deletes a specified topic. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant
Returns: Object - fetch response.

Param Type Description
id String topic ID to be deleted.
token String user's token.

loginUser ⇒ Object

Logs in a user based on the email + password combination Check out the API docs for this endpoint here

Kind: global constant

Param Type
options Object

forgotPassword ⇒ Object

This function sends a request to reset the user's password. It generates a token to be used in resetPassword Check out the API docs for this endpoint here

Kind: global constant

Param Type
options Object

registerUser ⇒ Object

Register a new user based on the email + password combination Check out the API docs for this endpoint here

Kind: global constant

Param Type
options Object

resetPassword ⇒ Object

Resets the user's password. Needs the token hosted in the email sent in forgotPassword NOTE:this is NOT implemented in the API to be done from the app. right now the only way it's through the email link pointing to Control Tower. Check out the API docs for this endpoint here

Kind: global constant

Param Type
options Object

uploadPhoto

Upload user photo

Kind: global constant

Param Type Description
file Blob file data
user Object

fetchWidgets

Fetch widgets according to params. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
params Object params sent to the API.
headers Object headers used in the request
_meta boolean flag indicating whether meta information should be included in the response or not

fetchWidget

Fetches data for a specific widget. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
id String widget id.
params Object params sent to the API.

deleteWidget

Deletes a specified widget. This fetch needs authentication. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
widgetId String widget ID to be deleted.
datasetId String dataset ID.
token String user's token.

updateWidget

Updates data for the widget provided. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
widget Object widget data.
token string user's token.

createWidget

Creates a new widget. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
widget Object widget data.
datasetId string Dataset ID the widget belongs to.
token string user's token.

fetchWidgetMetadata

Fetches the metadata associated to the widget provided. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
widgetId string widget data.
datasetId string Dataset ID the widget belongs to.
token string user's token.
params Object request parameters.

updateWidgetMetadata

Updates the metadata for the widget provided. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
widget Object widget data.
datasetId string Dataset ID the widget belongs to.
metadata Object metadata to be updated.
token string user's token.

createWidgetMetadata

Creates the metadata for the widget provided. Check out the API docs for this endpoint here

Kind: global constant

Param Type Description
widgetId string widget id.
datasetId string Dataset ID the widget belongs to.
metadata Object metadata to be updated.
token string user's token.

getBandNames() ⇒ Promise.<Array.<string>>

Return the names of the bands

Kind: global function

getBandStatsInfo(bandName) ⇒ Promise.<object>

Return the statistical information of a band

Kind: global function

Param Type Description
bandName string Name of the band

getChartInfo(widgetEditor) ⇒ ChartInfo

Return the ChartInfo object for a raster chart

Kind: global function

Param Type Description
widgetEditor object Store object