autocompleteSearch
Autocomplete search
Returns basic information about locations matching an autocomplete of the search text.
/cities/autocomplete
Usage and SDK Samples
curl -X GET "https://api.apieco.ir/accuweather-locs/locations/v1/cities/autocomplete?apikey=&q=&language="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AutoCompleteApi;
import java.io.File;
import java.util.*;
public class AutoCompleteApiExample {
public static void main(String[] args) {
AutoCompleteApi apiInstance = new AutoCompleteApi();
String apiecoKey = apiecoKey_example; // String |
String apikey = apikey_example; // String | Provided API Key (Don`t Change The Value)
String countryCode = countryCode_example; // String | unique id used to search within a specific country
String q = q_example; // String | Text to use for Autocomplete search.
String language = language_example; // String | String indicating the language in which to return the resource
try {
inline_response_200_3 result = apiInstance.autocompleteSearch(apiecoKey, apikey, countryCode, q, language);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoCompleteApi#autocompleteSearch");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AutoCompleteApi;
public class AutoCompleteApiExample {
public static void main(String[] args) {
AutoCompleteApi apiInstance = new AutoCompleteApi();
String apiecoKey = apiecoKey_example; // String |
String apikey = apikey_example; // String | Provided API Key (Don`t Change The Value)
String countryCode = countryCode_example; // String | unique id used to search within a specific country
String q = q_example; // String | Text to use for Autocomplete search.
String language = language_example; // String | String indicating the language in which to return the resource
try {
inline_response_200_3 result = apiInstance.autocompleteSearch(apiecoKey, apikey, countryCode, q, language);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AutoCompleteApi#autocompleteSearch");
e.printStackTrace();
}
}
}
String *apiecoKey = apiecoKey_example; //
String *apikey = apikey_example; // Provided API Key (Don`t Change The Value) (default to WiGNI5bGCbDCeQErSNm0I97azbwEbcKD)
String *countryCode = countryCode_example; // unique id used to search within a specific country
String *q = q_example; // Text to use for Autocomplete search.
String *language = language_example; // String indicating the language in which to return the resource (optional) (default to en-us)
AutoCompleteApi *apiInstance = [[AutoCompleteApi alloc] init];
// Autocomplete search
[apiInstance autocompleteSearchWith:apiecoKey
apikey:apikey
countryCode:countryCode
q:q
language:language
completionHandler: ^(inline_response_200_3 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var AccuWeatherLocations = require('accu_weather__locations');
var api = new AccuWeatherLocations.AutoCompleteApi()
var apiecoKey = apiecoKey_example; // {String}
var apikey = apikey_example; // {String} Provided API Key (Don`t Change The Value)
var countryCode = countryCode_example; // {String} unique id used to search within a specific country
var q = q_example; // {String} Text to use for Autocomplete search.
var opts = {
'language': language_example // {String} String indicating the language in which to return the resource
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.autocompleteSearch(apiecoKey, apikey, countryCode, q, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class autocompleteSearchExample
{
public void main()
{
var apiInstance = new AutoCompleteApi();
var apiecoKey = apiecoKey_example; // String |
var apikey = apikey_example; // String | Provided API Key (Don`t Change The Value) (default to WiGNI5bGCbDCeQErSNm0I97azbwEbcKD)
var countryCode = countryCode_example; // String | unique id used to search within a specific country
var q = q_example; // String | Text to use for Autocomplete search.
var language = language_example; // String | String indicating the language in which to return the resource (optional) (default to en-us)
try
{
// Autocomplete search
inline_response_200_3 result = apiInstance.autocompleteSearch(apiecoKey, apikey, countryCode, q, language);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AutoCompleteApi.autocompleteSearch: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\AutoCompleteApi();
$apiecoKey = apiecoKey_example; // String |
$apikey = apikey_example; // String | Provided API Key (Don`t Change The Value)
$countryCode = countryCode_example; // String | unique id used to search within a specific country
$q = q_example; // String | Text to use for Autocomplete search.
$language = language_example; // String | String indicating the language in which to return the resource
try {
$result = $api_instance->autocompleteSearch($apiecoKey, $apikey, $countryCode, $q, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AutoCompleteApi->autocompleteSearch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AutoCompleteApi;
my $api_instance = WWW::SwaggerClient::AutoCompleteApi->new();
my $apiecoKey = apiecoKey_example; # String |
my $apikey = apikey_example; # String | Provided API Key (Don`t Change The Value)
my $countryCode = countryCode_example; # String | unique id used to search within a specific country
my $q = q_example; # String | Text to use for Autocomplete search.
my $language = language_example; # String | String indicating the language in which to return the resource
eval {
my $result = $api_instance->autocompleteSearch(apiecoKey => $apiecoKey, apikey => $apikey, countryCode => $countryCode, q => $q, language => $language);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AutoCompleteApi->autocompleteSearch: $@\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.AutoCompleteApi()
apiecoKey = apiecoKey_example # String |
apikey = apikey_example # String | Provided API Key (Don`t Change The Value) (default to WiGNI5bGCbDCeQErSNm0I97azbwEbcKD)
countryCode = countryCode_example # String | unique id used to search within a specific country
q = q_example # String | Text to use for Autocomplete search.
language = language_example # String | String indicating the language in which to return the resource (optional) (default to en-us)
try:
# Autocomplete search
api_response = api_instance.autocomplete_search(apiecoKey, apikey, countryCode, q, language=language)
pprint(api_response)
except ApiException as e:
print("Exception when calling AutoCompleteApi->autocompleteSearch: %s\n" % e)
Parameters
Name | Description |
---|---|
countryCode* |
String
unique id used to search within a specific country
Required
|
Name | Description |
---|---|
apieco-key* |
String
Required
|
Name | Description |
---|---|
apikey* |
String
Provided API Key (Don`t Change The Value)
Required
|
q* |
String
Text to use for Autocomplete search.
Required
|
language |
String
String indicating the language in which to return the resource
|