npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mapify/core

v0.7.1

Published

Mapify core package

Downloads

35

Readme

README

Summary

  • Mapify Core - a software developer toolkit for the Mapify platform

The @mapify/core project contains the Mapify software development toolkit Typescript package which can be used to connect to mapify services.

Further Documentation and Blog Posts

For further information and blog posts you can go here.

General Setup

You will need to have nodejs and npm installed.

You will need a Mapify account in order to get an API Key to use when configuring the SDK and other components.

  • Get your desired API Key from the Mapify console.

Mapify Core

Core Setup

Install @mapify/core from npm:

  • npm i @mapify/core --save

The Mapify core sdk requires:

  • A Mapify API Key in order to access the Mapify platform. Get your API Key from the Mapify console.

Using Mapify Core

To use the Mapify core sdk you will need to initialize a new instance of the MapifyClient. This can be done like so:

import { MapifyClient, ClientConfig } from '@mapify/core';

const clientConfig: ClientConfig = {
	// Your API key
	apiKey: environment.mapifyApiKey,
};
const mapifyClient = MapifyClient.createClient(clientConfig);

From this point on you can use mapifyClient in order to get services related to different data you want to manage.

For example to list layers:

const layerService = mapifyClient.layers;
const layersPaginated = await layerService.getAllPaginated();
const layers = layersPaginated?.items;

Examples of services available include:

const buildingService = mapifyClient.buildings;
const layerService = mapifyClient.layers;
const panoramaService = mapifyClient.panoramas;
const datasetService = mapifyClient.datasets;
const datafeedService = mapifyClient.datafeeds;
const mapService = mapifyClient.maps;
const workflowService = mapifyClient.workflows;

From these servives you can access the methods to deal with the respective content. For example from the mapifyClient.maps you can access methods related to maps, such as listing, getting a specific map, altering an exisiting, and creating a new map. Below are examples of how to list some of the content available:

Examples of using the services:

// Example listing apis
const apiService = mapifyClient.api;
const apis = await apiService.getAll();
console.log('apis:', apis);

// Example listing buildings
const buildingService = mapifyClient.buildings;
const buildingsPaginated = await buildingService.getAllPaginated();
const buildings = buildingsPaginated?.items;
console.log('buildings:', buildings);

// Example listing layers
const layerService = mapifyClient.layers;
const layersPaginated = await layerService.getAllPaginated();
const layers = layersPaginated?.items;
console.log('layers:', layers);

// Example listing datasets
const datasetService = mapifyClient.datasets;
const datasetsPaginated = await datasetService.getAllPaginated();
const datasets = datasetsPaginated?.items;
console.log('datasets:', datasets);

// Example listing datafeeds
const datafeedService = mapifyClient.datafeeds;
const datafeedsPaginated = await datafeedService.getAllPaginated();
const datafeeds = datafeedsPaginated?.items;
console.log('datafeeds:', datafeeds);

// Example listing maps
const mapService = mapifyClient.maps;
const mapsPaginated = await mapService.getAllPaginated();
const maps = mapsPaginated?.items;
console.log('maps:', maps);

// Example listing workflows
const workflowService = mapifyClient.workflows;
const workflowsPaginated = await workflowService.getAllPaginated();
const workflows = workflowsPaginated?.items;
console.log('workflows:', workflows);