API

POST /api/token/

  • Create a WSSE token

Requirements

Name Requirement Type Description
_apikey (.*) Your Sharindata API Key
_apisecret (.*) Your Sharindata API Secret

GET /api/token/destroy

  • Destroy current WSSE token

Converter

POST /api/tool/color/hextorgb

  • Return Rgb color code

Parameters

Parameter Type Required? Description
hex ^\#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ false Hex color code prefixed by #

POST /api/tool/color/rgbtohex

  • Return Hex color code

Parameters

Parameter Type Required? Description
red [0-9]{1,3} false red value (0-255)
green [0-9]{1,3} false green value (0-255)
blue [0-9]{1,3} false blue value (0-255)

Country

GET /api/data/countries

  • Returns all countries

GET /api/data/country/{iso}

  • Returns country corresponding to the iso

Requirements

Name Requirement Type Description
iso string Example => fr, us, de

Currency

GET /api/data/currencies

  • Returns all currencies

GET /api/data/currency/{iso_code}

  • Returns currency corresponding to the iso code

Requirements

Name Requirement Type Description
iso_code string Example => eur, usd, cny

GET /api/data/currency/{iso_code}/countries

  • Returns countries which use the currency corresponding to the iso code

Requirements

Name Requirement Type Description
iso_code string Example => eur, usd, cny

Image

POST /api/tool/image/allcolors

  • Returns all colors from image

Parameters

Parameter Type Required? Description
image [a-z]{1,} true Image file path with '@' before. Ex : @/home/sharindata/image.png

POST /api/tool/image/maincolors

  • Returns mains colors from Image

Parameters

Parameter Type Required? Description
image [a-z]{1,} true Image file path with '@' before. Ex : @/home/sharindata/image.png
nbColor [0-9]{1,} false Max number of colors to return (default : 2). Ex : 5

Language

GET /api/data/language/{iso_code_6391}

  • Returns language corresponding to the iso code 639-1

Requirements

Name Requirement Type Description
iso_code_6391 string Example => fr, de, ar

GET /api/data/language/{iso_code_6391}/countries

  • Returns countries which speak the language corresponding to the iso code 639-1

Requirements

Name Requirement Type Description
iso_code_6391 string Example => fr, de, ar

GET /api/data/languages

  • Returns all languages

Randomize

POST /api/tool/random/string

  • Return random string

Parameters

Parameter Type Required? Description
length [0-9]{1,} true Length of random string
option [0-3]{1} false
  • 0: Alpha Lower
  • 1: Alpha Lower+Alpha Upper
  • 2: Alpha Lower+Alpha Upper+Numeric
  • 3: Alpha Lower+Alpha Upper+Numeric+Special Char

Timezone

GET /api/data/timezone/{code}

  • Returns timezone corresponding to the code

Requirements

Name Requirement Type Description
code string Example => europe_paris

GET /api/data/timezones

  • Returns all timezones

Unclassifiable

POST /api/tool/useragent/details

  • Returns user agent details

Parameters

Parameter Type Required? Description
user_agent true User agent header information; Ex: $_SERVER['HTTP_USER_AGENT']
accept true Accept header information; Ex: $_SERVER['HTTP_ACCEPT']
wap_profile false WAP Profile header information; Ex: $_SERVER['HTTP_X_WAP_PROFILE']
profile false Profile header information; Ex: $_SERVER['HTTP_PROFILE']

Zone

GET /api/data/zone/{code}

  • Returns zone corresponding to the code

Requirements

Name Requirement Type Description
code string Example => europe, oceania

GET /api/data/zones

  • Returns all zones