C# Класс BoxKite.Twitter.PlacesGeoExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
CreatePlace ( this session, string name, double latitude, double longitude, string containedWithin, string token ) : Task

Creates a new place object at the given latitude and longitude.

ref: https://dev.twitter.com/docs/api/1.1/post/geo/place

GetPlaceIDFromGeocode ( this session, double latitude = 0.0, double longitude = 0.0, string accuracy = "10m", string granularity = "neighborhood", int maxResults = 20 ) : Task

Given a latitude and a longitude, searches for up to 20 places that can be used as a place_id when updating a status.

ref: https://dev.twitter.com/docs/api/1.1/get/geo/reverse_geocode

GetPlaceIDFromInfo ( this session, string query = "", double latitude = 0.0, double longitude = 0.0, string accuracy = "10m", string containedWithin = "", string granularity = "neighborhood", int maxResults = 20, string ipAddress = "" ) : Task

Search for places that can be attached to a statuses/update. Given a latitude and a longitude pair, an IP address, or a name, this request will return a list of all the valid places that can be used as the place_id when updating a status

ref: https://dev.twitter.com/docs/api/1.1/get/geo/search

GetPlaceInfo ( this session, string placeId ) : Task

Returns all the information about a known place.

ref: https://dev.twitter.com/docs/api/1.1/get/geo/id/%3Aplace_id

GetPlaceSimilarName ( this session, string name = "", double latitude = 0.0, double longitude = 0.0, string containedWithin = "" ) : Task

Locates places near the given coordinates which are similar in name. NOTE: The token contained in the response is the token needed to be able to create a new place.

ref: https://dev.twitter.com/docs/api/1.1/get/geo/similar_places

Описание методов

CreatePlace() публичный статический Метод

Creates a new place object at the given latitude and longitude.
ref: https://dev.twitter.com/docs/api/1.1/post/geo/place
public static CreatePlace ( this session, string name, double latitude, double longitude, string containedWithin, string token ) : Task
session this
name string The name a place is known as.
latitude double The latitude the place is located at.
longitude double The longitude the place is located at.
containedWithin string The place_id within which the new place can be found. Try and be as close as possible with the containing place. For example, for a room in a building, set the contained_within as the building place_id.
token string The token found in the response from geo/similar_places.
Результат Task

GetPlaceIDFromGeocode() публичный статический Метод

Given a latitude and a longitude, searches for up to 20 places that can be used as a place_id when updating a status.
ref: https://dev.twitter.com/docs/api/1.1/get/geo/reverse_geocode
public static GetPlaceIDFromGeocode ( this session, double latitude = 0.0, double longitude = 0.0, string accuracy = "10m", string granularity = "neighborhood", int maxResults = 20 ) : Task
session this
latitude double The latitude to search around.
longitude double The longitude to search around.
accuracy string A hint on the "region" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If this is not passed in, then it is assumed to be 0m.
granularity string This is the minimal granularity of place types to return and must be one of: poi, neighborhood, city, admin or country.
maxResults int A hint as to the number of results to return.
Результат Task

GetPlaceIDFromInfo() публичный статический Метод

Search for places that can be attached to a statuses/update. Given a latitude and a longitude pair, an IP address, or a name, this request will return a list of all the valid places that can be used as the place_id when updating a status
ref: https://dev.twitter.com/docs/api/1.1/get/geo/search
public static GetPlaceIDFromInfo ( this session, string query = "", double latitude = 0.0, double longitude = 0.0, string accuracy = "10m", string containedWithin = "", string granularity = "neighborhood", int maxResults = 20, string ipAddress = "" ) : Task
session this
query string Free-form text to match against while executing a geo-based query, best suited for finding nearby locations by name. Remember to URL encode the query.
latitude double The latitude to search around.
longitude double The longitude to search around.
accuracy string A hint on the "region" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If this is not passed in, then it is assumed to be 0m.
containedWithin string This is the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found.
granularity string This is the minimal granularity of place types to return and must be one of: poi, neighborhood, city, admin or country. If no granularity is provided for the request neighborhood is assumed.
maxResults int A hint as to the number of results to return.
ipAddress string An IP address. Used when attempting to fix geolocation based off of the user's IP address.
Результат Task

GetPlaceInfo() публичный статический Метод

Returns all the information about a known place.
ref: https://dev.twitter.com/docs/api/1.1/get/geo/id/%3Aplace_id
public static GetPlaceInfo ( this session, string placeId ) : Task
session this
placeId string A place in the world.
Результат Task

GetPlaceSimilarName() публичный статический Метод

Locates places near the given coordinates which are similar in name. NOTE: The token contained in the response is the token needed to be able to create a new place.
ref: https://dev.twitter.com/docs/api/1.1/get/geo/similar_places
public static GetPlaceSimilarName ( this session, string name = "", double latitude = 0.0, double longitude = 0.0, string containedWithin = "" ) : Task
session this
name string The name a place is known as.
latitude double The latitude to search around
longitude double The longitude to search around
containedWithin string This is the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found.
Результат Task