|
Climaps API
version 1
|
Static Public Member Functions | |
| static | createOwnFilter () |
| static | deleteOwnFilter () |
| static | getContent () |
| static | getExtendedContent () |
| static | getOwnFilters () |
| static | setOwnFilterContent () |
Static Public Attributes | |
| static | FILTERID_MY_STATIONS = 0 |
| Filter containing all the stations the current can view or modify. | |
| static | FILTERID_PUBLIC_STATIONS = 1 |
| Filter containing all the public stations (i.e., that anyone can view) | |
This class lets you manipulate the filters of the current user.
Filters are just a list of stations on which the current user has at least the view permission, including public stations. With filters you can have a view on a subset of stations instead of seeing all of them at once.
|
static |
Create a new filter for the current user.
| string | stationsId | A comma-separated list of stations Id (e.g., "650,612,1033") |
| string | name | Filter name |
An object such as:
| Property | Type | Description |
|---|---|---|
| success | boolean | Whether the filter could be created |
| error | string | Error message in case of failure |
|
static |
Delete a filter of the current user.
| int | filterId | Filter id |
An object such as:
| Property | Type | Description |
|---|---|---|
| success | boolean | Whether the filter could be deleted |
| error | string | Error message in case of failure |
|
static |
Get the list of stations of a given filter.
| int | filterId | Filter id |
An array of objects such as:
| Property | Type | Description |
|---|---|---|
| id | int | Station id |
| name | string | Station name |
|
static |
Get the list of stations of a given filter, plus additional information.
| int | filterId | Filter id |
| int | notOlderThan | Deadline for data in seconds, older data is ignored (set to 0 to remove age restriction) |
An object with stations indexed by their id such as:
| Property | Type | Description |
|---|---|---|
| id | Station | Extended station data |
The stations are objects such as:
| Property | Type | Description |
|---|---|---|
| id | int | Station id |
| name | string | Station name |
| lat | float | Latitude |
| lng | float | Longitude |
| type | int | Type of the station (e.g., stations::STATION_TYPE_DS3_MASTER) |
| epochActivity | int | Epoch time of the most recent activity |
| epochSensor | int | Epoch time of the most recent sensor data |
| battery | float | Most recent battery level reported |
| public | boolean | Whether the station is publicly accessible |
| modifiable | boolean | Whether the current user has "modify" permission on the station |
|
static |
Get the filters of the current user.
An array of objects such as:
| Property | Type | Description |
|---|---|---|
| id | int | Filter id |
| name | string | Filter name |
| nbStations | int | Number of stations in the filter |
|
static |
Set the content of an existing filter of the current user.
| int | filterId | Filter id |
| string | stationsId | A comma-separated list of stations Id (e.g., "650,612,1033") |
| string | name | Filter name |
An object such as:
| Property | Type | Description |
|---|---|---|
| success | boolean | Whether the filter could be updated |
| error | string | Error message in case of failure |
1.8.8