public dynamic GetFeaturedCommunityLiveStatuses(int page, Partnerships.PartnershipType partnershipType, Community.CommunityStatusSort sort, string streamLocale) { RestClient _client = new RestClient("http://www.bungie.net/d1/Platform/Destiny"); var request = new RestRequest($"/CommunityContent/Live/Featured/{partnershipType}/{sort}/{page}/"); request.AddHeader("X-API-KEY", APIKey); request.AddParameter("page", page); request.AddParameter("partnershipType", partnershipType); request.AddParameter("sort", sort); request.AddParameter("streamLocale", streamLocale); var response = _client.Execute(request); dynamic deserializedResponse = JsonConvert.DeserializeObject <dynamic>(response.Content); return(deserializedResponse); }
Task <SearchResultOfCommunityLiveStatus> ICommunityContentClient.GetFeaturedCommunityLiveStatusesAsync(Partnerships.PartnershipType partnershipType, Community.CommunityStatusSort sort, int page, string streamLocale) { string[] pathSegments = new string[] { "CommunityContent", "Live", "Featured", ((int)partnershipType).ToString(), ((int)sort).ToString(), page.ToString() }; System.Collections.Generic.List <QueryStringItem> queryItems = new System.Collections.Generic.List <QueryStringItem>() { new QueryStringItem("streamLocale", (streamLocale ?? "")) }; Uri uri = GetEndpointUri(pathSegments, true, queryItems); return(GetEntityAsync <SearchResultOfCommunityLiveStatus>(uri)); }
Task <SearchResultOfCommunityLiveStatus> ICommunityContentClient.GetCommunityLiveStatusesForFriendsAsync(Partnerships.PartnershipType partnershipType, Community.CommunityStatusSort sort, int page) { string[] pathSegments = new string[] { "CommunityContent", "Live", "Friends", ((int)partnershipType).ToString(), ((int)sort).ToString(), page.ToString() }; Uri uri = GetEndpointUri(pathSegments, true, null); return(GetEntityAsync <SearchResultOfCommunityLiveStatus>(uri)); }
SearchResultOfCommunityLiveStatus ICommunityContentClient.GetFeaturedCommunityLiveStatuses(Partnerships.PartnershipType partnershipType, Community.CommunityStatusSort sort, int page, string streamLocale) => CommunityContent.GetFeaturedCommunityLiveStatusesAsync(partnershipType, sort, page, streamLocale).GetAwaiter().GetResult();
SearchResultOfCommunityLiveStatus ICommunityContentClient.GetCommunityLiveStatusesForFriends(Partnerships.PartnershipType partnershipType, Community.CommunityStatusSort sort, int page) => CommunityContent.GetCommunityLiveStatusesForFriendsAsync(partnershipType, sort, page).GetAwaiter().GetResult();