Code Monkey home page Code Monkey logo

countriesnowapi's Introduction

CountriesNow

A curation of Countries data including (dial codes, states, cities, currencies, capitals etc) served over a REST API so you don't have to have them locally in your applications. This means lighter application sizes as you wouldn't have to install another package to use geo data. Please note that this doesn't guarantee complete or correct data, feel free to raise issues where necessary.

landing page

USAGE

The API does not require any form of Authentication or token.

const BASE_URL = 'https://countriesnow.space/api/v0.1/countries'

let getCountries = async () => {
  const response = await fetch(`${BASE_URL}`).then(response => response.json())
  const { data } = response

  data.forEach((country) => {
    console.log(country) // {"country": "Afghanistan", "cities": [ "Herat", "Kabul", "Kandahar", "Molah", ...]}
  })
}

The API does not require any form of Authentication or token.


Local Setup

git clone https://github.com/YourName/countriesNowAPI.git

Change directory

cd countriesNowAPI

Install packages

npm i

Start Project

npm start

Run test

npm run integration:test

Contribution

Please read the contribution guide here

โœจ All thanks to this gist, datahub, and this repository for the data curated.

countriesnowapi's People

Contributors

anuragphadnis avatar dependabot[bot] avatar dr5hn avatar fermellone avatar fladioarmandika avatar iambenkay avatar johnexzy avatar martinsonuoha avatar mr-emeka avatar ryzbaka avatar sileski avatar ucejtech avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.