GithubHelp home page GithubHelp logo

johnexzy / countriesnowapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from martinsonuoha/countriesnowapi

0.0 0.0 0.0 6.34 MB

CountriesNow is an Open source API for retrieving geo-information for countries, including their states, cities, population, etc. ๐ŸŒŽ

Home Page: http://countriesnow.space

License: MIT License

JavaScript 99.98% CSS 0.01% Makefile 0.01% Handlebars 0.01% Procfile 0.01%

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.

CleanShot 2022-03-17 at 9 19 17@2x

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

Feel free to support and keep the API running

Buy Me A Coffee

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

countriesnowapi's People

Contributors

anuragphadnis avatar deepsource-autofix[bot] avatar dependabot[bot] avatar dr5hn avatar fermellone avatar fladioarmandika avatar iambenkay avatar jbmoutout avatar johnexzy avatar martinsonuoha avatar mr-emeka avatar peter81git avatar ryzbaka avatar sileski avatar timaagaard 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.