@planet/client
A JavaScript client for Planet's imagery API.
Installation
Install the @planet/client
package with npm
(which comes with Node).
npm install --save @planet/client
It is also possible to load a standalone bundle of the library in a script tag. Without a module loader, this will create a global planet
object:
<script src="https://unpkg.com/@planet/client/dist/planet.js"></script>
This will redirect to the most recent release. To avoid the redirect, you can include a specific version number (e.g. https://unpkg.com/@planet/client@2.4.1/dist/planet.js
).
Using the Library
The @planet/client
package can be used in a Node based project or in the browser with a CommonJS module loader (like Browserify or webpack).
The library requires a global Promise
implementation. This comes with Node >= 0.12 and modern browsers. To use @planet/client
in an environment without Promise
, you can use a polyfill.
With the above prerequisites, you can start using the @planet/client
package in your application. See the client API documentation for details on using the library.