Skip to content

M-Media-Group/npm-cartes-io

Repository files navigation

npm-cartes-io

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

Install

npm i @m-media/npm-cartes-io

Usage

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();

Releases

No releases published

Packages

No packages published