Package Exports
- @m-media/npm-cartes-io
- @m-media/npm-cartes-io/lib/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@m-media/npm-cartes-io) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
npm-cartes-io
Install
npm i @m-media/npm-cartes-ioUsage
import cartes from "npm-cartes-io";
// Maps
cartes.maps().get();
cartes.maps().with(['markers']).get();
cartes.maps().search(query);
const map = cartes.maps().create(data);
// You can create a map from a file (requires auth and permissions)
const map = cartes.maps().createFromFile(file);
cartes.maps(map.uuid).get();
cartes.maps(map.uuid).related().get();
cartes.maps(map.uuid, map.token).update(data);
cartes.maps(map.uuid, map.token).delete();
// Markers
cartes.maps(map.uuid).markers().get();
const marker = cartes.maps(map.uuid).markers().create(data);
// You can create markers from a file (requires auth and permissions)
const marker = cartes.maps(map.uuid).markers().createFromFile(file);
cartes.maps(map.uuid).markers(marker.id, marker.token).delete();
// Categories
cartes.categories().get();
cartes.categories().search(query);
// Authentication
cartes.setApiKey(apiKey);
// User
cartes.me().get();
cartes.me().update(data);
// Users
cartes.users().get();
cartes.users(userId).get();