BoxKite.Twitter.PlacesGeoExtensions.CreatePlace C# (CSharp) Метод

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
        public static async Task<AddPlaceResponse> CreatePlace(this IUserSession session,
            string name, double latitude,
            double longitude, string containedWithin, string token)
        {
            var parameters = new TwitterParametersCollection
                             {
                                 {"lat", latitude.ToString()},
                                 {"long", longitude.ToString()},
                                 {"name", name},
                                 {"contained_within", containedWithin},
                                 {"token", token}
                             };

            return await session.PostAsync(TwitterApi.Resolve("/1.1/geo/create.json"), parameters)
                .ContinueWith(c => c.MapToSingle<AddPlaceResponse>());
        }
    }