1.0.10 • Published 2 years ago

orinoco-countries v1.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

This is a sdk for OrinocoDev Countries API

Install

npm i orinoco-countries

Usages

const { getAllCountries, getOneCountry, getOneByPhone, getByCurrency } = require('orinoco-countries')

getAllCountries

Params apiKey (ApiKey from OrinocoDev Countries API)

getAllCountries(apiKey)

Return a array of countries

[

{

	currency: { name: 'Euro', symbol: 'EUR' },
	_id: '6217ee7be67a8320858f6013',
	name: 'Greece',
	phoneCode: '+30',
	flag: 'https://www.placesapi.dev/flags/GR.gif',
	shortName: 'GR'

},

{

	currency: { name: 'Pound', symbol: 'GBP' },
	_id: '6217ee7be67a8320858f6014',
	name: 'South Georgia and the South Sandwich Islands',
	phoneCode: '+null',
	flag: 'https://www.placesapi.dev/flags/GS.gif',
	shortName: 'GS'

},

...

]

getOneCountry

Params apiKey (ApiKey from OrinocoDev Countries API)

Params country (name of country)

getOneCountry(apiKey, country)

Return a country

{

	currency: { name: 'Euro', symbol: 'EUR' },
	_id: '6217ee7be67a8320858f6013',
	name: 'Greece',
	phoneCode: '+30',
	flag: 'https://www.placesapi.dev/flags/GR.gif',
	shortName: 'GR'

}

getOneByPhone

Params apiKey (ApiKey from OrinocoDev Countries API)

Params phoneCode (Phone code of country)

getOneCountry(apiKey, phoneCode)

Return a country by phone code

{

	currency: { name: 'Euro', symbol: 'EUR' },
	_id: '6217ee7be67a8320858f6013',
	name: 'Greece',
	phoneCode: '+30',
	flag: 'https://www.placesapi.dev/flags/GR.gif',
	shortName: 'GR'

}

getByCurrency

Params apiKey (ApiKey from OrinocoDev Countries API)

Params currencySymbol (ApiKey from OrinocoDev Countries API)

getByCurrency(apiKey, currencySymbol)

Return a array of countries by currency symbol

[

{

	currency: { name: 'Euro', symbol: 'EUR' },
	_id: '6217ee7be67a8320858f6013',
	name: 'Greece',
	phoneCode: '+30',
	flag: 'https://www.placesapi.dev/flags/GR.gif',
	shortName: 'GR'

},

{

	currency: { name: 'Euro', symbol: 'EUR' },
	_id: '6217ee7be67a8320858f60af',
	name: 'Kosovo',
	phoneCode: '+null',
	flag: 'https://www.placesapi.dev/flags/XK.gif',
	shortName: 'XK'

},

...

]

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago