-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.d.ts
111 lines (110 loc) · 4.73 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
declare module 'opencage-api-client' {
interface GeocodeRequest {
/**
* a 30 character long, alphanumeric string.
*/
key?: string;
/**
* the query string to be geocoded: a latitude, longitude or a placename/address.
*/
q: string;
/**
* When set to 1 we attempt to abbreviate and shorten the formatted string we return. Learn more about formatted placenames.
*/
abbrv?: number;
/**
* When set to 1 the various request parameters are added to the response for ease of debugging.
*/
add_request?: number;
/**
* Used only for forward geocoding. This value will restrict the possible results to a defined bounding box.
* The value of the bounds parameter should be specified as two coordinate points forming the south-west and north-east corners of a bounding box (min lon, min lat, max lon, max lat).
*
* Example usage:
* bounds=-0.563160,51.280430,0.278970,51.683979
*/
bounds?: string;
/**
* Used only for forward geocoding. Restricts results to the specified country/territory or countries.
*
* Example usage:
* countrycode=de
*
* The country code is a two letter code as defined by the ISO 3166-1 Alpha 2 standard. E.g. gb for the United Kingdom, fr for France, us for United States.
* Non-two letter country codes are ignored.
* You can specify multiple country codes by supplying a comma separated list. For example countrycode=ca,us would limit results to either the United States or Canada.
*/
countrycode?: string;
/**
* Wraps the returned JSON with a function name.
*/
jsonp?: string;
/**
* An IETF format language code (such as es for Spanish or pt-BR for Brazilian Portuguese), or native in which case we will attempt to return the response in the local language(s).
*
* Example usage:
* language=de
*
* If no language is explicitly specified, we will then look for an HTTP Accept-Language header like those sent by a browser and use highest quality language specified (please see RFC 4647 for details). If the request did not specify a valid header, then en (English) will be assumed.
*/
language?: string;
/**
* The maximum number of results we should return. Default is 10. Maximum allowable value is 100.
*
* Example usage:
* limit=1
*/
limit?: number;
/**
* An integer from 1-10. Only results with at least this confidence will be returned. Learn more about our confidence score on API documentation.
*
* Example usage:
* min_confidence=3
*/
min_confidence?: number;
/**
* When set to 1 results will not contain annotations.
*
* Example usage:
* no_annotations=1
*
* The only exception is if the optional roadinfo parameter is set (see below).
*/
no_annotations?: number;
/**
* When set to 1 results will not be deduplicated.
*/
no_dedupe?: number;
/**
* When set to 1 the query contents are not logged. Please use this parameter if you have concerns about privacy and want us to have no record of your query.
*/
no_record?: number;
/**
* When set to 1 results are 'pretty' printed for easier reading. Useful for debugging.
*/
pretty?: number;
/**
* Used only for forward geocoding. Provides the geocoder with a hint to bias results in favour of those closer to the specified location. Please note though, this is just one of many factors in the internal scoring we use for ranking results.
* The value is a point with latitude, longitude coordinates in decimal format.
*
* Example usage:
* proximity=51.952659,7.632473
*
* Values that are not valid coordinates are ignored.
*/
proximity?: string;
/**
* When set to 1 the behaviour of the geocoder is changed to attempt to match the nearest road (as opposed to address). If possible we also fill additional information in the roadinfo annotation. Please see details API Documentation.
*/
roadinfo?: number;
/**
* When set to 1 we include only the address (exluding POI names) in the formatted string we return.
*
* Example usage: address_only=1
*
* As an example, by default a reverse geocoding request for the coordinates 50.976004, 11.336753 returns a formatted value of Goethes Gartenhaus, Corona-Schröter-Weg 1, 99425 Weimar, Germany, but if address_only=1 is specified the value would be simply Corona-Schröter-Weg 1, 99425 Weimar, Germany. This can be particularly useful when there are many stores/restaurants/whatever at a single location (for example a multi-story building).
*/
address_only?: number;
}
export function geocode(input: GeocodeRequest): Promise<any>;
}