public TvMazeClient(HttpClient httpClient, IRateLimitingStrategy rateLimitingStrategy) { if (rateLimitingStrategy == null) { rateLimitingStrategy = new ThrowExceptionRateLimitingStrategy(); } var flurlClient = new FlurlClient(httpClient); // Caller didn't provide the base address. if (flurlClient.BaseUrl == null) { flurlClient.BaseUrl = BaseApiUrl; } flurlClient.AllowAnyHttpStatus(); var tvMazeHttpClient = new TvMazeHttpClient(flurlClient, rateLimitingStrategy); Search = new SearchEndpoint(tvMazeHttpClient); Shows = new ShowsEndpoint(tvMazeHttpClient); Episodes = new EpisodesEndpoint(tvMazeHttpClient); Updates = new UpdatesEndpoint(tvMazeHttpClient); Lookup = new LookupEndpoint(tvMazeHttpClient); }
public TvMazeClient() { var httpClient = new HttpClient { BaseAddress = new Uri(BaseApiUrl) }; Search = new SearchEndpoint(httpClient); Shows = new ShowsEndpoint(httpClient); Episodes = new EpisodesEndpoint(httpClient); Updates = new UpdatesEndpoint(httpClient); }
public OAuthGoodreadsClient(string apiKey, string apiSecret, string accessToken, string accessSecret) : base(apiKey, apiSecret, accessToken, accessSecret) { Authors = new AuthorsEnpoint(_connection); AuthorsFollowing = new AuthorsFollowingEndpoint(_connection); Books = new BooksEndpoint(_connection); Comments = new CommentsEndpoint(_connection); Events = new EventsEndpoint(_connection); Followers = new FollowersEndpoint(_connection); Friends = new FriendsEndpoint(_connection); Groups = new GroupsEndpoint(_connection); Notifications = new NotificationsEndpoint(_connection); OwnedBooks = new OwnedBooksEndpoint(_connection); Quotes = new QuotesEndpoint(_connection); ReadStatuses = new ReadStatusesEndpoint(_connection); Recommendations = new RecommendationsEndpoint(_connection); Reviews = new ReviewsEndpoint(_connection); Series = new SeriesEndpoint(_connection); Shelves = new ShelvesEndpoint(_connection); Topics = new TopicsEndpoint(_connection); Updates = new UpdatesEndpoint(_connection); Users = new UsersEndpoint(_connection); UserStatuses = new UserStatusesEndpoint(_connection); }
public async Task GetFriendsUpdates() { var updates = await UpdatesEndpoint.GetFriendsUpdates(UpdateType.Reviews); Assert.NotNull(updates); }