Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 1.59 KB

README.md

File metadata and controls

67 lines (41 loc) · 1.59 KB

Pangea Client

pangea-client is a set of libraries for different languages to interface with Pangea API.

When using node the data is delivered in Arrow or JSON, developers are required to provide their own types.


Getting started

Access to the API via pangea-client requires credentials, please apply for access first.

Once credentials are issued, they will need to be set in the environment variables.

The easiest way to use these credentials is to create a .env file in the project root folder and populate it like so:

PANGEA_USERNAME=xxxxx
PANGEA_PASSWORD=xxxxx

Examples

Checkout the github repository separately for example code.


Setup

Before proceeding, make sure to have node installed globally. Easiest way is to install nvm, and use that to install the node version listed in .nvmrc. See the following:


After node is installed, cd to the directory where you cloned the repo (node sub-folder for megarepo) and run:

npm i

Running the Examples

To run any file in the examples folder, use the template

npm run example:${EXAMPLE_FILE_NAME}

Like so:

npm run example:arrow-blocks
npm run example:jsonstream-blocks
npm run example:jsonstream-status
...

NOTE: When adding a new example file, make sure to add the corresponding package.json script task to be able to run it.