public void Authenticate() { var argsDict = OAuthArgsDictionary.AuthenticateArgsDictionary(_clientId, "code", _redirectUri); var queryString = QueryStringHelper.BuildQueryString(argsDict); var requestUrl = string.Concat(AuthenticateUrl, queryString); _httpClient.SendGetRequest <object>(requestUrl); }
public SuggestCompletionVenuesModel SuggestCompletionVenues(string near, string query, double?lAcc, double?alt, double?altAcc, int?limit, int?radius, string sw, string ne) { var argsDict = VenuesArgsDictionaryService.SuggestCompletionDictionary(_clientId, _clientSecret, near, query, lAcc, alt, altAcc, limit, radius, ne, sw); var queryString = QueryStringHelper.BuildQueryString(argsDict); var requestUrl = string.Concat(ServerUrl, queryString); var suggestComletionVenuesModel = _httpClient.SendGetRequest <SuggestCompletionVenuesModel>(requestUrl).Result; return(suggestComletionVenuesModel); }
public string GetAccessToken(string code) { var argsDict = OAuthArgsDictionary.AccessTokenArgsDictionary(_clientId, _clientSecret, "authorization_code", _redirectUri, code); var queryString = QueryStringHelper.BuildQueryString(argsDict); var requestUrl = string.Concat(GetAccessTokenUrl, queryString); var accessToken = _httpClient.SendGetRequest <AccessTokenModel>(requestUrl).Result.Access_Token; return(accessToken); }
public SearchVenuesModel SearchVenues(string near, string query = null, int?limit = null, string intent = "checkin", double?radius = null, string sw = null, string ne = null, string categoryId = null, string url = null, string providerId = null, string linkedId = null) { var argsDict = VenuesArgsDictionaryService.SearchVenuesDictionary(_clientId, _clientSecret, near, query, limit, intent, radius, sw, ne, categoryId, url, providerId, linkedId); var queryString = QueryStringHelper.BuildQueryString(argsDict); var requestUrl = string.Concat(ServerUrl, queryString); var searchVenuesModel = _httpClient.SendGetRequest <SearchVenuesModel>(requestUrl).Result; return(searchVenuesModel); }
public TrendingVenuesModel TrendingVenues(double latitude, double longitude, short?limit, short?radius) { var argsDict = VenuesArgsDictionaryService.TrendingVenuesDictionary(_clientId, _clientSecret, latitude, longitude, limit, radius); var queryString = QueryStringHelper.BuildQueryString(argsDict); var requestUrl = string.Concat(ServerUrl, queryString); var trendingVenuesModel = _httpClient.SendGetRequest <TrendingVenuesModel>(requestUrl).Result; return(trendingVenuesModel); }
public VenuesCategoriesModel VenuesCategories() { var argsDict = VenuesArgsDictionaryService.VenuesCategoriesDictionary(_clientId, _clientSecret); var queryString = QueryStringHelper.BuildQueryString(argsDict); var requestUrl = string.Concat(ServerUrl, queryString); var venuesCategoriesModel = _httpClient.SendGetRequest <VenuesCategoriesModel>(requestUrl).Result; return(venuesCategoriesModel); }
public UserInfoModel User(string userId, string accessToken) { var argsDict = UsersArgsDictionary.UserInfoArgsDictionary(accessToken); var queryString = QueryStringHelper.BuildQueryString(argsDict); var requestUrl = string.Concat(ServerUrl, queryString); var userInfoModel = _httpClient.SendGetRequest <UserInfoModel>(requestUrl).Result; return(userInfoModel); }
public ExploreVenuesModel ExploreVenues(string near, double?lAcc = null, double?alt = null, double?altAcc = null, double?radius = null, string section = null, string query = null, int?limit = null, int?offset = null, string novelty = null, string friendVisits = null, string time = null, string day = null, bool?venuePhotos = null, string lastVenue = null, bool?openNow = null, bool?sortByDistance = null, int[] price = null, bool?saved = null, bool?specials = null) { var argsDict = VenuesArgsDictionaryService.ExploreVenuesDictionary(_clientId, _clientSecret, near, lAcc, alt, altAcc, radius, section, query, limit, offset, novelty, friendVisits, time, day, venuePhotos, lastVenue, openNow, sortByDistance, price, saved, specials); var queryString = QueryStringHelper.BuildQueryString(argsDict); var requestUrl = string.Concat(ServerUrl, queryString); var exploreVenuesModel = _httpClient.SendGetRequest <ExploreVenuesModel>(requestUrl).Result; return(exploreVenuesModel); }