to submit a data request.
curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/earth-quake/fdsnws/event/1/query?format=&starttime=&endtime=&maxlongitude=&maxlatitude=&minlongitude=&minlatitude="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryApi;
import java.io.File;
import java.util.*;
public class QueryApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apieco-key
ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
apieco-key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.setApiKeyPrefix("Token");
QueryApi apiInstance = new QueryApi();
String apiecoKey = apiecoKey_example; // String |
String format = format_example; // String | Specify the output format.
format=csv
Response format is CSV. Mime-type is “text/csv”.
format=geojson
Response format is GeoJSON. Mime-type is “application/json”.
format=kml
Response format is KML. Mime-type is “vnd.google-earth.kml+xml”.
format=quakeml
Alias for "xml" format.
format=text
Response format is plain text. Mime-type is “text/plain”.
format=xml
The xml format is dependent upon the request method used.
String starttime = starttime_example; // String | Limit to events on or after the specified start time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
String endtime = endtime_example; // String | Limit to events on or before the specified end time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
String maxlongitude = maxlongitude_example; // String | Limit to events with a longitude smaller than the specified maximum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
String maxlatitude = maxlatitude_example; // String | Limit to events with a latitude smaller than the specified maximum. NOTE: min values must be less than max values.
String minlongitude = minlongitude_example; // String | Limit to events with a longitude larger than the specified minimum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
String minlatitude = minlatitude_example; // String | Limit to events with a latitude larger than the specified minimum. NOTE: min values must be less than max values.
try {
inline_response_200_2 result = apiInstance.query(apiecoKey, format, starttime, endtime, maxlongitude, maxlatitude, minlongitude, minlatitude);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling QueryApi#query");
e.printStackTrace();
}
}
}
import io.swagger.client.api.QueryApi;
public class QueryApiExample {
public static void main(String[] args) {
QueryApi apiInstance = new QueryApi();
String apiecoKey = apiecoKey_example; // String |
String format = format_example; // String | Specify the output format.
format=csv
Response format is CSV. Mime-type is “text/csv”.
format=geojson
Response format is GeoJSON. Mime-type is “application/json”.
format=kml
Response format is KML. Mime-type is “vnd.google-earth.kml+xml”.
format=quakeml
Alias for "xml" format.
format=text
Response format is plain text. Mime-type is “text/plain”.
format=xml
The xml format is dependent upon the request method used.
String starttime = starttime_example; // String | Limit to events on or after the specified start time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
String endtime = endtime_example; // String | Limit to events on or before the specified end time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
String maxlongitude = maxlongitude_example; // String | Limit to events with a longitude smaller than the specified maximum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
String maxlatitude = maxlatitude_example; // String | Limit to events with a latitude smaller than the specified maximum. NOTE: min values must be less than max values.
String minlongitude = minlongitude_example; // String | Limit to events with a longitude larger than the specified minimum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
String minlatitude = minlatitude_example; // String | Limit to events with a latitude larger than the specified minimum. NOTE: min values must be less than max values.
try {
inline_response_200_2 result = apiInstance.query(apiecoKey, format, starttime, endtime, maxlongitude, maxlatitude, minlongitude, minlatitude);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling QueryApi#query");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];
String *apiecoKey = apiecoKey_example; //
String *format = format_example; // Specify the output format.
format=csv
Response format is CSV. Mime-type is “text/csv”.
format=geojson
Response format is GeoJSON. Mime-type is “application/json”.
format=kml
Response format is KML. Mime-type is “vnd.google-earth.kml+xml”.
format=quakeml
Alias for "xml" format.
format=text
Response format is plain text. Mime-type is “text/plain”.
format=xml
The xml format is dependent upon the request method used. (optional)
String *starttime = starttime_example; // Limit to events on or after the specified start time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed. (optional)
String *endtime = endtime_example; // Limit to events on or before the specified end time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed. (optional)
String *maxlongitude = maxlongitude_example; // Limit to events with a longitude smaller than the specified maximum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values. (optional)
String *maxlatitude = maxlatitude_example; // Limit to events with a latitude smaller than the specified maximum. NOTE: min values must be less than max values. (optional)
String *minlongitude = minlongitude_example; // Limit to events with a longitude larger than the specified minimum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values. (optional)
String *minlatitude = minlatitude_example; // Limit to events with a latitude larger than the specified minimum. NOTE: min values must be less than max values. (optional)
QueryApi *apiInstance = [[QueryApi alloc] init];
[apiInstance queryWith:apiecoKey
format:format
starttime:starttime
endtime:endtime
maxlongitude:maxlongitude
maxlatitude:maxlatitude
minlongitude:minlongitude
minlatitude:minlatitude
completionHandler: ^(inline_response_200_2 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var EarthquakeDataApi = require('_earthquake_data_api');
var defaultClient = EarthquakeDataApi.ApiClient.instance;
// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"
var api = new EarthquakeDataApi.QueryApi()
var apiecoKey = apiecoKey_example; // {String}
var opts = {
'format': format_example, // {String} Specify the output format.
format=csv
Response format is CSV. Mime-type is “text/csv”.
format=geojson
Response format is GeoJSON. Mime-type is “application/json”.
format=kml
Response format is KML. Mime-type is “vnd.google-earth.kml+xml”.
format=quakeml
Alias for "xml" format.
format=text
Response format is plain text. Mime-type is “text/plain”.
format=xml
The xml format is dependent upon the request method used.
'starttime': starttime_example, // {String} Limit to events on or after the specified start time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
'endtime': endtime_example, // {String} Limit to events on or before the specified end time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
'maxlongitude': maxlongitude_example, // {String} Limit to events with a longitude smaller than the specified maximum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
'maxlatitude': maxlatitude_example, // {String} Limit to events with a latitude smaller than the specified maximum. NOTE: min values must be less than max values.
'minlongitude': minlongitude_example, // {String} Limit to events with a longitude larger than the specified minimum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
'minlatitude': minlatitude_example // {String} Limit to events with a latitude larger than the specified minimum. NOTE: min values must be less than max values.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.query(apiecoKey, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class queryExample
{
public void main()
{
// Configure API key authorization: apieco-key
Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");
var apiInstance = new QueryApi();
var apiecoKey = apiecoKey_example; // String |
var format = format_example; // String | Specify the output format.
format=csv
Response format is CSV. Mime-type is “text/csv”.
format=geojson
Response format is GeoJSON. Mime-type is “application/json”.
format=kml
Response format is KML. Mime-type is “vnd.google-earth.kml+xml”.
format=quakeml
Alias for "xml" format.
format=text
Response format is plain text. Mime-type is “text/plain”.
format=xml
The xml format is dependent upon the request method used. (optional)
var starttime = starttime_example; // String | Limit to events on or after the specified start time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed. (optional)
var endtime = endtime_example; // String | Limit to events on or before the specified end time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed. (optional)
var maxlongitude = maxlongitude_example; // String | Limit to events with a longitude smaller than the specified maximum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values. (optional)
var maxlatitude = maxlatitude_example; // String | Limit to events with a latitude smaller than the specified maximum. NOTE: min values must be less than max values. (optional)
var minlongitude = minlongitude_example; // String | Limit to events with a longitude larger than the specified minimum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values. (optional)
var minlatitude = minlatitude_example; // String | Limit to events with a latitude larger than the specified minimum. NOTE: min values must be less than max values. (optional)
try
{
inline_response_200_2 result = apiInstance.query(apiecoKey, format, starttime, endtime, maxlongitude, maxlatitude, minlongitude, minlatitude);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling QueryApi.query: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');
$api_instance = new Swagger\Client\Api\QueryApi();
$apiecoKey = apiecoKey_example; // String |
$format = format_example; // String | Specify the output format.
format=csv
Response format is CSV. Mime-type is “text/csv”.
format=geojson
Response format is GeoJSON. Mime-type is “application/json”.
format=kml
Response format is KML. Mime-type is “vnd.google-earth.kml+xml”.
format=quakeml
Alias for "xml" format.
format=text
Response format is plain text. Mime-type is “text/plain”.
format=xml
The xml format is dependent upon the request method used.
$starttime = starttime_example; // String | Limit to events on or after the specified start time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
$endtime = endtime_example; // String | Limit to events on or before the specified end time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
$maxlongitude = maxlongitude_example; // String | Limit to events with a longitude smaller than the specified maximum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
$maxlatitude = maxlatitude_example; // String | Limit to events with a latitude smaller than the specified maximum. NOTE: min values must be less than max values.
$minlongitude = minlongitude_example; // String | Limit to events with a longitude larger than the specified minimum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
$minlatitude = minlatitude_example; // String | Limit to events with a latitude larger than the specified minimum. NOTE: min values must be less than max values.
try {
$result = $api_instance->query($apiecoKey, $format, $starttime, $endtime, $maxlongitude, $maxlatitude, $minlongitude, $minlatitude);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling QueryApi->query: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QueryApi;
# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";
my $api_instance = WWW::SwaggerClient::QueryApi->new();
my $apiecoKey = apiecoKey_example; # String |
my $format = format_example; # String | Specify the output format.
format=csv
Response format is CSV. Mime-type is “text/csv”.
format=geojson
Response format is GeoJSON. Mime-type is “application/json”.
format=kml
Response format is KML. Mime-type is “vnd.google-earth.kml+xml”.
format=quakeml
Alias for "xml" format.
format=text
Response format is plain text. Mime-type is “text/plain”.
format=xml
The xml format is dependent upon the request method used.
my $starttime = starttime_example; # String | Limit to events on or after the specified start time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
my $endtime = endtime_example; # String | Limit to events on or before the specified end time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed.
my $maxlongitude = maxlongitude_example; # String | Limit to events with a longitude smaller than the specified maximum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
my $maxlatitude = maxlatitude_example; # String | Limit to events with a latitude smaller than the specified maximum. NOTE: min values must be less than max values.
my $minlongitude = minlongitude_example; # String | Limit to events with a longitude larger than the specified minimum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values.
my $minlatitude = minlatitude_example; # String | Limit to events with a latitude larger than the specified minimum. NOTE: min values must be less than max values.
eval {
my $result = $api_instance->query(apiecoKey => $apiecoKey, format => $format, starttime => $starttime, endtime => $endtime, maxlongitude => $maxlongitude, maxlatitude => $maxlatitude, minlongitude => $minlongitude, minlatitude => $minlatitude);
print Dumper($result);
};
if ($@) {
warn "Exception when calling QueryApi->query: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.QueryApi()
apiecoKey = apiecoKey_example # String |
format = format_example # String | Specify the output format.
format=csv
Response format is CSV. Mime-type is “text/csv”.
format=geojson
Response format is GeoJSON. Mime-type is “application/json”.
format=kml
Response format is KML. Mime-type is “vnd.google-earth.kml+xml”.
format=quakeml
Alias for "xml" format.
format=text
Response format is plain text. Mime-type is “text/plain”.
format=xml
The xml format is dependent upon the request method used. (optional)
starttime = starttime_example # String | Limit to events on or after the specified start time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed. (optional)
endtime = endtime_example # String | Limit to events on or before the specified end time. NOTE: All times use ISO8601 Date/Time format. Unless a timezone is specified, UTC is assumed. (optional)
maxlongitude = maxlongitude_example # String | Limit to events with a longitude smaller than the specified maximum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values. (optional)
maxlatitude = maxlatitude_example # String | Limit to events with a latitude smaller than the specified maximum. NOTE: min values must be less than max values. (optional)
minlongitude = minlongitude_example # String | Limit to events with a longitude larger than the specified minimum. NOTE: rectangles may cross the date line by using a minlongitude < -180 or maxlongitude > 180. NOTE: min values must be less than max values. (optional)
minlatitude = minlatitude_example # String | Limit to events with a latitude larger than the specified minimum. NOTE: min values must be less than max values. (optional)
try:
api_response = api_instance.query(apiecoKey, format=format, starttime=starttime, endtime=endtime, maxlongitude=maxlongitude, maxlatitude=maxlatitude, minlongitude=minlongitude, minlatitude=minlatitude)
pprint(api_response)
except ApiException as e:
print("Exception when calling QueryApi->query: %s\n" % e)