Servicios - mezeitune/challengeBackEnd GitHub Wiki

Como consultarlo por API:

[GET] localhost:9290/ip/:ipNumber

Por linea de comando -> curl -X GET http://localhost:9290/ip/:ipNumber

Obtiene toda la información asociada a una ip.

Ejemplo de respuesta:

{ 
  "country_name": "United Kingdom of Great Britain and Northern Ireland",
  "iso_country_code": "GBR",
  "official_languages": [ "English" ],
  "current_hours": [ 
     "2019-12-09T02:07:44.095Z",
     "2019-12-09T02:07:44.112Z",
     "2019-12-09T02:07:44.112Z",
     "2019-12-09T02:07:44.112Z",
     "2019-12-09T02:07:44.112Z",
     "2019-12-09T02:07:44.112Z",
     "2019-12-09T02:07:44.112Z",
     "2019-12-09T02:07:44.112Z",
     "2019-12-09T02:07:44.112Z" 
  ],
  "estimated_distance": 7609.181870219288,
  "currencies": [ 
   { 
     "local_currency": "British pound",
     "euro_quote": 0.841078 
   } 
  ] 
  }

[GET]/distances

Por linea de comando -> curl -X GET http://localhost:9290/distances

Obtiene información asociada a distancias consultadas con anterioridad.

Ejemplo de respuesta:

{ 
  "furthest_distance_from_bs_as": { 
     "distance": 7609.181870219288,
     "country": "United Kingdom of Great Britain and Northern Ireland"
  },
  "average_distance_from_bs_as": 7609.181870219288,
  "nearest_distance_from_bs_as": { 
     "distance": 7609.181870219288,
     "country": "United Kingdom of Great Britain and Northern Ireland" 
  } 
}