Skip to content

Latest commit

 

History

History
997 lines (578 loc) · 26.7 KB

api.md

File metadata and controls

997 lines (578 loc) · 26.7 KB

Table of Contents

Hecate

cli.js:12-72

Auth

lib/auth.js:13-93

help

lib/auth.js:26-35

Print help documentation about the subcommand to stderr

get

lib/auth.js:43-92

Return the auth settings for a given hecate instance

Parameters

  • options Object Options for making a request to the auth API (optional, default {})
  • cb function (err, res) style callback function

BBox

lib/bbox.js:17-158

help

lib/bbox.js:30-39

Print help documentation about the subcommand to stderr

get

lib/bbox.js:55-157

Queries hecate /api/data/features endpoint Currently supports downloading features by bbox

Parameters

  • options Object Options for making a request to the hecate /api/data/features endpoint (optional, default {})
    • options.history boolean? [default: false] If true, return current and historic features within the given bbox.
    • options.bbox (Array | string)? Bounding box of features to download from hecate
    • options.output Stream? Stream to write line-delimited GeoJSON to
  • cb function (err, res) style callback function

Returns function (err, res) style callback

Bounds

lib/bounds.js:16-629

help

lib/bounds.js:29-43

Print help documentation about the subcommand to stderr

stats

lib/bounds.js:53-139

Return stats of geo data within a give bounds

Parameters

  • options Object options for making a query to the bounds list endpoint (optional, default {})
  • cb function (err, res) style callback function

Returns function (err, res) style callback

list

lib/bounds.js:149-225

Return a list of the bounds that are currently loaded on the server

Parameters

  • options Object options for making a query to the bounds list endpoint (optional, default {})
  • cb function (err, res) style callback function

Returns function (err, res) style callback

get

lib/bounds.js:238-324

Queries the /api/data/bounds endpoints, returning a line-delimited stream of GeoJSON Features

Parameters

  • options Object Options for making a request to the bounds endpoint (optional, default {})
    • options.bound String? Name of the bound to download from
    • options.output Stream? Stream to write line-delimited GeoJSON to
  • cb function (err, res) style callback function

Returns function (err, res) style callback

meta

lib/bounds.js:335-423

Returns underlying bounds geojson for a given bounds

Parameters

  • options Object Options for making a request to the bounds endpoint (optional, default {})
    • options.bound String? Name of the bound to download from
  • cb function (err, res) style callback function

Returns function (err, res) style callback

delete

lib/bounds.js:434-518

Delete a boundary file

Parameters

  • options Object Options for making a request to the bounds endpoint (optional, default {})
    • options.bound String? Name of the bound to download from
  • cb function (err, res) style callback function

Returns function (err, res) style callback

set

lib/bounds.js:530-628

Create or update a boundary file

Parameters

  • options Object Options for making a request to the bounds endpoint (optional, default {})
    • options.bound String? Name of the bound to download from
    • options.geom String? JSON Geometry of bound
  • cb function (err, res) style callback function

Returns function (err, res) style callback

Clone

lib/clone.js:16-126

help

lib/clone.js:29-38

Print help documentation about the subcommand to stderr

get

lib/clone.js:49-125

Clone all data on a given hecate server

Parameters

  • options Object Options for making a request to the hecate /api/data/features endpoint (optional, default {})
    • options.output Stream? Stream to write line-delimited GeoJSON to
  • cb function (err, res) style callback function

Returns function (err, res) style callback

Deltas

lib/deltas.js:15-242

help

lib/deltas.js:28-37

Print help documentation about the subcommand to stderr

list

lib/deltas.js:49-145

Queries the recent deltas list, returning the most recent 100 deltas

Parameters

  • options Object Options for making a request to the deltas endpoint (optional, default {})
    • options.limit String Number of deltas to list by default (optional, default 100)
    • options.offset String? delta id to start listing at
  • cb function (err, res) style callback function

Returns function (err, res) style callback

get

lib/deltas.js:155-241

Returns data about a specific delta

Parameters

  • options Object Options for making a request to the deltas endpoint (optional, default {})
  • cb function (err, res) style callback function

Returns function (err, res) style callback

Feature

lib/feature.js:15-333

help

lib/feature.js:28-38

Print help documentation about the subcommand to stderr

history

lib/feature.js:50-136

Queries the feature store endpoint, returning a history of a GeoJSON Feature

Parameters

  • options Object Options for making a request to the bounds endpoint (optional, default {})
    • options.feature String? ID of the feature to download from
  • cb function (err, res) style callback function

Returns function (err, res) style callback

key

lib/feature.js:148-234

Queries the feature store endpoint by key, returning a GeoJSON Feature

Parameters

  • options Object Options for making a request to the bounds endpoint (optional, default {})
    • options.feature String? key of the feature to download from
  • cb function (err, res) style callback function

Returns function (err, res) style callback

get

lib/feature.js:246-332

Queries the feature store endpoint, returning a GeoJSON Feature

Parameters

  • options Object Options for making a request to the bounds endpoint (optional, default {})
    • options.feature String? ID of the feature to download from
  • cb function (err, res) style callback function

Returns function (err, res) style callback

ArrayReader

lib/import.js:26-52

Allow features to be passed to the import API as an array instead of as a stream

Parameters

next

lib/import.js:42-51

Return the next feature in the array, mimics a stream

Returns string GeoJSON Feature to import

Import

lib/import.js:60-307

help

lib/import.js:73-86

Print help documentation about the subcommand to stderr

multi

lib/import.js:102-306

Given a Stream of line-delimited features or an Array of features, validate and import them

Parameters

  • options Object options object (optional, default {})
    • options.message string Human readable description of changes
    • options.input (string | Array<Object>) String of filepath or Array containing features to import
    • options.ignoreRHR boolean Ignore RHR winding errors
    • options.ignoreDup boolean Don't check duplicate IDs (will usually cause an import failure if they exist)
    • options.dryrun boolean Perform all validation but don't import
  • cb function (err, res) style callback

Returns function (err, res) style callback

Revert

lib/revert.js:10-157

help

lib/revert.js:23-34

Print help documentation about the subcommand to stderr

deltas

lib/revert.js:48-156

Revert a given set of deltas

Parameters

  • options Object Options for making reversion of a set of deltas (optional, default {})
    • options.start number Inclusive start delta ID to revert
    • options.end number Inclusive end delta ID to revert
    • options.output Stream? Stream to write line-delimited GeoJSON to
  • cb function (err, res) style callback function

Returns function (err, res) style callback

Schema

lib/schema.js:15-127

help

lib/schema.js:28-37

Print help documentation about the subcommand to stderr

get

lib/schema.js:47-126

Retrieve a JSON schema that feature properties must conform to

Parameters

  • options Object options object (optional, default {})
  • cb function (err, res) style callback

Returns function (err, res) style callback

Server

lib/server.js:15-209

help

lib/server.js:28-38

Print help documentation about the subcommand to stderr

get

lib/server.js:49-123

Get server metadata

Parameters

  • options Object Options for making a request to meta API (optional, default {})
  • cb function (err, res) style callback function

Returns function (err, res) style callback

stats

lib/server.js:134-208

Get server stats

Parameters

  • options Object Options for making a request to meta API (optional, default {})
  • cb function (err, res) style callback function

Returns function (err, res) style callback

Tiles

lib/tiles.js:15-134

help

lib/tiles.js:28-36

Print help documentation about the subcommand to stderr

get

lib/tiles.js:48-133

Fetch a Mapbox Vector Tile for the given zxy

Parameters

  • options Object Options for making a request to the deltas endpoint (optional, default {})
    • options.zxy String? z/x/y coordinate to request
  • cb function (err, res) style callback function

Returns function (err, res) style callback

User

lib/user.js:15-332

help

lib/user.js:28-39

Print help documentation about the subcommand to stderr

list

lib/user.js:50-133

List users with optional filtering

Parameters

  • options Object Options object (optional, default {})
    • options.filter string User prefix to filter by
  • cb function (err, res) style callback

Returns function (err, res) style callback

info

lib/user.js:143-216

Retrieve metadata about the user that makes the request

Parameters

  • options Object options object (optional, default {})
  • cb function (err, res) style callback

Returns function (err, res) style callback

register

lib/user.js:229-331

Register a new user account

Parameters

  • options Object options object (optional, default {})
    • options.username string Username to register
    • options.email string Email of account to register
    • options.password string Password of account to register
  • cb function (err, res) style callback

Returns function (err, res) style callback

Webhooks

lib/webhooks.js:15-575

help

lib/webhooks.js:28-41

Print help documentation about the subcommand to stderr

list

lib/webhooks.js:52-128

Queries hecate /api/webhooks endpoint

Parameters

  • options Object Options for making a request to the hecate /api/webhooks endpoint (optional, default {})
  • cb function (err, res) style callback function

Returns function (err, res) style callback

get

lib/webhooks.js:140-226

Get a specific webhook given the ID

Parameters

  • options Object Options for making a request to the hecate /api/webhooks endpoint (optional, default {})
    • options.id number ID of the webhook to retreive
  • cb function (err, res) style callback function

Returns function (err, res) style callback function

delete

lib/webhooks.js:238-323

Delete a specific webhook given the ID

Parameters

  • options Object Options for making a request to the hecate /api/webhooks endpoint (optional, default {})
    • options.id number ID of the webhook to delete
  • cb function (err, res) style callback function

Returns function (err, res) style callback function

update

lib/webhooks.js:338-453

Update a given webhook ID

Parameters

  • options Object Options for making a request to the hecate /api/webhooks endpoint (optional, default {})
    • options.id number ID of the webhook to update
    • options.name string Name of the webhook
    • options.url string URL of the webhook
    • options.actions Array<string> server actions the webhook should be fired on
  • cb function (err, res) style callback function

Returns function (err, res) style callback function

create

lib/webhooks.js:467-574

Create a new webhook

Parameters

  • options Object Options for making a request to the hecate /api/webhooks endpoint (optional, default {})
    • options.name string Name of the webhook
    • options.url string URL of the webhook
    • options.actions Array<string> server actions the webhook should be fired on
  • cb function (err, res) style callback function

Returns function (err, res) style callback function