API Services URLs¶
Most of the URLs used as part of the API services will be unstructured URLs
Locations API¶
Location By Address¶
-
class
bingmaps.urls.locations_build_urls.
LocationByAddressUrl
(data, httpprotocol)[source]¶ This class helps in building a url for location by address service.
Variables: - data – Data required for building up the URL
- httpprotocol – http protocol for the url
- schema – location by address schema to which the data will be dumped
All the URL values are retrieved from the schema.
Example:
>>> data = { 'adminDistrict': 'WA', ... 'locality': 'Seattle', ... 'c': 'te', ... 'o': 'xml', ... 'includeNeighborhood': 1, ... 'key': 'abs'} >>> loc_by_address = LocationByAddressUrl(data, 'http') >>> loc_by_address.main_url 'dev.virtualearth.net' >>> loc_by_address.protocol 'http:/' >>> loc_by_address.resourcePath >>> loc_by_address.restApi 'Locations' >>> loc_by_address.rest 'REST' >>> loc_by_address.version 'v1' >>> loc_by_address.query '?adminDistrict=WA&locality=Seattle&c=te&o=xml&includeNeighborhood=1&include=ciso2&maxResults=20&key=abs'
-
main_url
¶ This property helps in returning the main URL used in bingmaps rest services
Getter: Returns a URL
dev.virtualearth.net
Type: string
-
protocol
¶ This property helps in returning the http protocol to be used as part of the URL.
Variables: http_protocol – The http protocol passed in (http/https)
Getter: Returns a string relevant to the http protocol
- http:
http:/
- https:
https:/
Type: string
- http:
-
query
¶ This property helps in retrieving the query part of the URL
Getter: Returns a part of the URL which consist of all the query parameters. The query is formatted with a ?
in front of it.Type: string
-
resourcePath
¶ This property gives a part of the URL that specifies a resource such as an address or landmark.
Getter: Returns a string that identifies the resource path such as address or landmark
None
for Locations services
Type: string
-
rest
¶ This property make the URL accessible for REST services.
Getter: Returns a string saying that the URL is a REST service URL
REST
Type: string
-
restApi
¶ This property gives a part of the URL that identifies the REST API
Getter: Returns a part of the URL that identifies the REST API
Locations
for Locations services
Type: string
-
version
¶ This property gives the version of the Bing Maps REST services
Getter: Returns a string of Bing Maps REST services version
v1
for Locations services
Type: string
Location By Point¶
-
class
bingmaps.urls.locations_build_urls.
LocationByPointUrl
(data, httpprotocol)[source]¶ This class helps in building a url for location by point service.
Variables: - data – Data required for building up the URL
- httpprotocol – http protocol for the url
- schema – location by point schema to which the data will be dumped
All the URL values are retrieved from the schema.
Example:
>>> data = { 'point': '47.64054,-122.12934', ... 'includeEntityTypes': 'Address', ... 'c': 'te', ... 'o': 'xml', ... 'includeNeighborhood': 1, ... 'key': 'abs'} >>> loc_by_point = LocationByPointUrl(data, 'http') >>> loc_by_point.main_url 'dev.virtualearth.net' >>> loc_by_point.protocol 'http:/' >>> loc_by_point.resourcePath >>> loc_by_point.restApi 'Locations' >>> loc_by_point.rest 'REST' >>> loc_by_point.version 'v1' >>> loc_by_point.query '47.64054,-122.12934?includeEntityTypes=Address&includeNeighborhood=1&include=ciso2&c=te&o=xml&maxResults=20&key=abs'
-
main_url
¶ This property helps in returning the main URL used in bingmaps rest services
Getter: Returns a URL
dev.virtualearth.net
Type: string
-
protocol
¶ This property helps in returning the http protocol to be used as part of the URL.
Variables: http_protocol – The http protocol passed in (http/https)
Getter: Returns a string relevant to the http protocol
- http:
http:/
- https:
https:/
Type: string
- http:
-
query
¶ This property helps in retrieving the query part of the URL
Getter: Returns a part of the URL which consist of all the query parameters Type: string
-
resourcePath
¶ This property gives a part of the URL that specifies a resource such as an address or landmark.
Getter: Returns a string that identifies the resource path such as address or landmark
None
for Locations services
Type: string
-
rest
¶ This property make the URL accessible for REST services.
Getter: Returns a string saying that the URL is a REST service URL
REST
Type: string
-
restApi
¶ This property gives a part of the URL that identifies the REST API
Getter: Returns a part of the URL that identifies the REST API
Locations
for Locations services
Type: string
-
version
¶ This property gives the version of the Bing Maps REST services
Getter: Returns a string of Bing Maps REST services version
v1
for Locations services
Type: string
Location By Query¶
-
class
bingmaps.urls.locations_build_urls.
LocationByQueryUrl
(data, httpprotocol)[source]¶ This class helps in building a url for location by query service.
Variables: - data – Data required for building up the URL
- httpprotocol – http protocol for the url
- schema – location by query schema to which the data will be dumped
All the URL values are retrieved from the schema.
Example:
>>> data = {'q': '1014 Oatney Ridge Ln.,Morrisville,NC-27560', ... 'key': 'abs'} >>> loc_by_query = LocationByQueryUrl(data, 'http') >>> loc_by_query.main_url 'dev.virtualearth.net' >>> loc_by_query.protocol 'http:/' >>> loc_by_query.resourcePath >>> loc_by_query.restApi 'Locations' >>> loc_by_query.rest 'REST' >>> loc_by_query.version 'v1' >>> loc_by_query.query '?q=1014%20Oatney%20Ridge%20Ln.%2CMorrisville%2CNC-27560&includeNeighborhood=0&include=ciso2&maxResults=20&key=abs'
-
main_url
¶ This property helps in returning the main URL used in bingmaps rest services
Getter: Returns a URL
dev.virtualearth.net
Type: string
-
protocol
¶ This property helps in returning the http protocol to be used as part of the URL.
Variables: http_protocol – The http protocol passed in (http/https)
Getter: Returns a string relevant to the http protocol
- http:
http:/
- https:
https:/
Type: string
- http:
-
query
¶ This property helps in retrieving the query part of the URL
Getter: Returns a part of the URL which consist of all the query parameters. The query is formatted with a ?
in front of it.Type: string
-
resourcePath
¶ This property gives a part of the URL that specifies a resource such as an address or landmark.
Getter: Returns a string that identifies the resource path such as address or landmark
None
for Locations services
Type: string
-
rest
¶ This property make the URL accessible for REST services.
Getter: Returns a string saying that the URL is a REST service URL
REST
Type: string
-
restApi
¶ This property gives a part of the URL that identifies the REST API
Getter: Returns a part of the URL that identifies the REST API
Locations
for Locations services
Type: string
-
version
¶ This property gives the version of the Bing Maps REST services
Getter: Returns a string of Bing Maps REST services version
v1
for Locations services
Type: string
Elevations API¶
-
class
bingmaps.urls.elevations_build_urls.
ElevationsUrl
(data, protocol, schema)[source]¶ This class helps in building a url for elevations API service.
Variables: - data – Data required for building up the URL
- protocol – http protocol for the url
- schema – Elevations schema to which the data will be dumped
All the URL values are retrieved from the schema.
Example:
>>> data = {'method': 'Polyline', ... 'points': [35.89431, ... -110.72522, ... 35.89393, ... -110.72578], ... 'samples': 10, ... 'key': 'abs'} >>> url = ElevationsUrl(data, 'http', Polyline()) >>> url.main_url 'dev.virtualearth.net' >>> url.protocol 'http:/' >>> url.resourcePath >>> url.restApi 'Elevation' >>> url.rest 'REST' >>> url.version 'v1' >>> url.query 'Polyline?points=35.89431,-110.72522,35.89393,-110.72578&heights=sealevel&samples=10&key=abs'
-
main_url
¶ This property helps in returning the main URL used in bingmaps rest services
Getter: Returns a URL
dev.virtualearth.net
Type: string
-
protocol
¶ This property helps in returning the http protocol to be used as part of the URL.
Variables: http_protocol – The http protocol passed in (http/https)
Getter: Returns a string relevant to the http protocol
- http:
http:/
- https:
https:/
Type: string
- http:
-
query
¶ This property helps in retrieving the query part of the URL
Getter: Returns a part of the URL which consist of all the query parameters. Type: string
-
resourcePath
¶ This property gives a part of the URL that specifies a resource such as an address or landmark.
Getter: Returns a string that identifies the resource path such as address or landmark
None
for Elevations services
Type: string
-
rest
¶ This property make the URL accessible for REST services.
Getter: Returns a string saying that the URL is a REST service URL
REST
Type: string
-
restApi
¶ This property gives a part of the URL that identifies the REST API
Getter: Returns a part of the URL that identifies the REST API
Elevations
for Elevations services
Type: string
-
version
¶ This property gives the version of the Bing Maps REST services
Getter: Returns a string of Bing Maps REST services version
v1
for Elevations services
Type: string
Traffic Incidents API¶
-
class
bingmaps.urls.traffic_build_urls.
TrafficIncidentsUrl
(data, schema, protocol='http')[source]¶ This class helps in building a url for elevations API service.
Variables: - data – Data required for building up the URL
- protocol – http protocol for the url
- schema – Elevations schema to which the data will be dumped
All the URL values are retrieved from the schema.
Example:
>>> data = {'mapArea': [37, -105, 45, -94], ... 'includeLocationCodes': 'true', ... 'type': [5], ... 'o': 'xml', ... 'key': 'abs'} >>> url = TrafficIncidentsUrl(data, TrafficIncidentsSchema(), ... 'http') >>> url.main_url 'dev.virtualearth.net' >>> url.protocol 'http:/' >>> url.resourcePath 'Incidents' >>> url.restApi 'Traffic' >>> url.rest 'REST' >>> url.version 'v1' >>> url.query '37.0,-105.0,45.0,-94.0/true?type=5&o=xml&key=abs'
-
main_url
¶ This property helps in returning the main URL used in bingmaps rest services
Getter: Returns a URL
dev.virtualearth.net
Type: string
-
protocol
¶ This property helps in returning the http protocol to be used as part of the URL.
Variables: http_protocol – The http protocol passed in (http/https)
Getter: Returns a string relevant to the http protocol
- http:
http:/
- https:
https:/
Type: string
- http:
-
query
¶ This property helps in retrieving the query part of the URL
Getter: Returns a part of the URL which consist of all the query parameters. Type: string
-
resourcePath
¶ This property gives a part of the URL that specifies a resource such as an address or landmark.
Getter: Returns a string that identifies the resource path such as address or landmark
None
for Elevations services
Type: string
-
rest
¶ This property make the URL accessible for REST services.
Getter: Returns a string saying that the URL is a REST service URL
REST
Type: string
-
restApi
¶ This property gives a part of the URL that identifies the REST API
Getter: Returns a part of the URL that identifies the REST API
Elevations
for Elevations services
Type: string
-
version
¶ This property gives the version of the Bing Maps REST services
Getter: Returns a string of Bing Maps REST services version
v1
for Elevations services
Type: string