getSafetyRanking
Returns safety score for a given location and radius.
/safety/safety-rated-locations/
Usage and SDK Samples
curl -X GET "https://v3.production.geosure.tech/safety/safety-rated-locations/?latitude=&longitude=&radius=&page[limit]=&page[offset]="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AmadeusApi;
import java.io.File;
import java.util.*;
public class AmadeusApiExample {
public static void main(String[] args) {
AmadeusApi apiInstance = new AmadeusApi();
String latitude = latitude_example; // String | Latitude (decimal coordinates)
String longitude = longitude_example; // String | Longitude (decimal coordinates)
Integer radius = 56; // Integer | >- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km.
Integer page[limit] = 56; // Integer | maximum items in one page
Integer page[offset] = 56; // Integer | start index of the requested page
try {
array[SafetyScoredLocations] result = apiInstance.getSafetyRanking(latitude, longitude, radius, page[limit], page[offset]);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AmadeusApi#getSafetyRanking");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AmadeusApi;
public class AmadeusApiExample {
public static void main(String[] args) {
AmadeusApi apiInstance = new AmadeusApi();
String latitude = latitude_example; // String | Latitude (decimal coordinates)
String longitude = longitude_example; // String | Longitude (decimal coordinates)
Integer radius = 56; // Integer | >- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km.
Integer page[limit] = 56; // Integer | maximum items in one page
Integer page[offset] = 56; // Integer | start index of the requested page
try {
array[SafetyScoredLocations] result = apiInstance.getSafetyRanking(latitude, longitude, radius, page[limit], page[offset]);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AmadeusApi#getSafetyRanking");
e.printStackTrace();
}
}
}
String *latitude = latitude_example; // Latitude (decimal coordinates)
String *longitude = longitude_example; // Longitude (decimal coordinates)
Integer *radius = 56; // >- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km. (optional) (default to 1)
Integer *page[limit] = 56; // maximum items in one page (optional) (default to 10)
Integer *page[offset] = 56; // start index of the requested page (optional) (default to 0)
AmadeusApi *apiInstance = [[AmadeusApi alloc] init];
// Returns safety score for a given location and radius.
[apiInstance getSafetyRankingWith:latitude
longitude:longitude
radius:radius
page[limit]:page[limit]
page[offset]:page[offset]
completionHandler: ^(array[SafetyScoredLocations] output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var GeoSureApi = require('geo_sure_api');
var api = new GeoSureApi.AmadeusApi()
var latitude = latitude_example; // {{String}} Latitude (decimal coordinates)
var longitude = longitude_example; // {{String}} Longitude (decimal coordinates)
var opts = {
'radius': 56, // {{Integer}} >- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km.
'page[limit]': 56, // {{Integer}} maximum items in one page
'page[offset]': 56 // {{Integer}} start index of the requested page
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getSafetyRanking(latitude, longitude, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getSafetyRankingExample
{
public void main()
{
var apiInstance = new AmadeusApi();
var latitude = latitude_example; // String | Latitude (decimal coordinates)
var longitude = longitude_example; // String | Longitude (decimal coordinates)
var radius = 56; // Integer | >- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km. (optional) (default to 1)
var page[limit] = 56; // Integer | maximum items in one page (optional) (default to 10)
var page[offset] = 56; // Integer | start index of the requested page (optional) (default to 0)
try
{
// Returns safety score for a given location and radius.
array[SafetyScoredLocations] result = apiInstance.getSafetyRanking(latitude, longitude, radius, page[limit], page[offset]);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AmadeusApi.getSafetyRanking: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAmadeusApi();
$latitude = latitude_example; // String | Latitude (decimal coordinates)
$longitude = longitude_example; // String | Longitude (decimal coordinates)
$radius = 56; // Integer | >- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km.
$page[limit] = 56; // Integer | maximum items in one page
$page[offset] = 56; // Integer | start index of the requested page
try {
$result = $api_instance->getSafetyRanking($latitude, $longitude, $radius, $page[limit], $page[offset]);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AmadeusApi->getSafetyRanking: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AmadeusApi;
my $api_instance = WWW::SwaggerClient::AmadeusApi->new();
my $latitude = latitude_example; # String | Latitude (decimal coordinates)
my $longitude = longitude_example; # String | Longitude (decimal coordinates)
my $radius = 56; # Integer | >- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km.
my $page[limit] = 56; # Integer | maximum items in one page
my $page[offset] = 56; # Integer | start index of the requested page
eval {
my $result = $api_instance->getSafetyRanking(latitude => $latitude, longitude => $longitude, radius => $radius, page[limit] => $page[limit], page[offset] => $page[offset]);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AmadeusApi->getSafetyRanking: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AmadeusApi()
latitude = latitude_example # String | Latitude (decimal coordinates)
longitude = longitude_example # String | Longitude (decimal coordinates)
radius = 56 # Integer | >- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km. (optional) (default to 1)
page[limit] = 56 # Integer | maximum items in one page (optional) (default to 10)
page[offset] = 56 # Integer | start index of the requested page (optional) (default to 0)
try:
# Returns safety score for a given location and radius.
api_response = api_instance.get_safety_ranking(latitude, longitude, radius=radius, page[limit]=page[limit], page[offset]=page[offset])
pprint(api_response)
except ApiException as e:
print("Exception when calling AmadeusApi->getSafetyRanking: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| latitude* |
String
Latitude (decimal coordinates)
Required
|
| longitude* |
String
Longitude (decimal coordinates)
Required
|
| radius |
Integer
>- radius of the search in Kilometer. Can be from 0 to 20, default value is 1 Km.
|
| page[limit] |
Integer
maximum items in one page
|
| page[offset] |
Integer
start index of the requested page
|