Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "city", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "TheCity API returns the city from a latitude and longitude using spatial mapping and data anlysis.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,5 +0,5 @@ | ||
# City Grabber | ||
This is a wrapper for the City Grabber API which gets a city or closest city from a latitude and longitude. | ||
# City | ||
The City Library is a wrapper for the City API which gets a city or closest city from a latitude and longitude. | ||
City grabber uses an algorithim that utilises spatial mapping and sophisticated data analysis to give you a blazing fast and accurate response from over 150,000 cities from every country across the globe. | ||
The City API uses an algorithim that utilises spatial mapping and sophisticated data analysis to give you a blazing fast and accurate response from over 150,000 cities from every country across the globe. | ||
@@ -12,3 +12,3 @@ This package requires an API key which can be generated [Here](https://city.rocket-solutions.co.uk/key). | ||
`npm i city-grabber --save` | ||
`npm i city --save` | ||
@@ -18,8 +18,8 @@ ## Usage | ||
``` | ||
const cityGrabber = require( 'city-grabber' ) | ||
const city = require( 'city' ) | ||
//Using Promises | ||
cityGrabber.get( latitude, longitude, size, apiKey ) | ||
.then( response => { | ||
const { city, country, population, distance } = response | ||
city.get( latitude, longitude, size, apiKey ) | ||
.then( location => { | ||
console.log( location ) | ||
}) | ||
@@ -29,3 +29,3 @@ .catch( e => console.log( e )) | ||
//Async await | ||
const { city, country, population, distance } = await cityGrabber.get( latitude, longitude, size, apiKey ) | ||
const location = await city.get( latitude, longitude, size, apiKey ) | ||
``` | ||
@@ -45,3 +45,3 @@ | ||
``` | ||
cityGrabber.get( 35.4526317, 139.4546863, 0, apiKey ) | ||
city.get( 35.4526317, 139.4546863, 0, apiKey ) | ||
//Response | ||
@@ -55,3 +55,3 @@ { | ||
cityGrabber.get( 42.34133262, -83.05576000, 1, apiKey ) | ||
city.get( 42.34133262, -83.05576000, 1, apiKey ) | ||
//Response | ||
@@ -58,0 +58,0 @@ { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
4272