public async Task CanGetAllFeedStatuses() { FeedRecordResponse result = await feedApi.GetAllFeedStatuses(); Assert.IsType <FeedRecordResponse>(result); Assert.NotEmpty(result.Results); Assert.True(result.TotalResults > 0); }
public async Task CanRetrieveListOfFeeds() { FeedRecordResponse feeds = await feedApi.GetAllFeedStatuses(); Assert.IsType <FeedRecordResponse>(feeds); Assert.NotEmpty(feeds.Results); foreach (FeedRecord feed in feeds.Results) { Assert.True(feed.FeedId.Length > 0); } }
public async Task CanCheckFeedStatus() { FeedRecordResponse feeds = await feedApi.GetAllFeedStatuses(); Assert.IsType <FeedRecordResponse>(feeds); Assert.NotEmpty(feeds.Results); var feedId = feeds.Results[0].FeedId; PartnerFeedResponse result = await feedApi.GetFeedStatus(feedId, true); Assert.IsType <PartnerFeedResponse>(result); Assert.True(result.FeedId == feedId); }
public async Task <FeedRecordResponse> GetAllFeedStatuses(int offset = 0, int limit = 10) { // to avoid deadlock if this method is executed synchronously await new ContextRemover(); var request = CreateRequest(); request.EndpointUri = "/v2/feeds"; if (offset > 0) { request.QueryParams.Add("offset", offset.ToString()); } if (limit > 0) { request.QueryParams.Add("limit", limit.ToString()); } var response = await client.GetAsync(request); FeedRecordResponse result = await ProcessResponse <FeedRecordResponse>(response); return(result); }