Skip to content

v1.4.0

Latest
Compare
Choose a tag to compare
@henrikfroehling henrikfroehling released this 29 Apr 22:26
· 494 commits to develop since this release
e826d1e

What's Changed

New Features

var pagedParameters = new TraktPagedParameters(1, 10); // page = 1, items per page = 10
TraktPagedResponse<ITraktTrendingShow> trendingShowsResponse = await client.Shows.GetTrendingShowsAsync(null, pagedParameters);

// getting the next page, the old way
pagedParameters.Page = pagedParameters.Page + 1;
trendingShowsResponse = await client.Shows.GetTrendingShowsAsync(extendedInfo, pagedParameters);

// getting the next page, the new way
trendingShowsResponse = await trendingShowsResponse.GetNextPageAsync();

// NOTE: The old way still works.
  • Add possibility to serialize objects as JSON with indentation (Issue 401)

The output of

ITraktShow show = ...; // Show: The Last of Us
string json = await TraktSerializationService.SerializeAsync(show);
Console.WriteLine(json);

looks like this:

{"title":"The Last of Us","year":2023,"ids":{"trakt":158947,"slug":"the-last-of-us","tvdb":392256,"imdb":"tt3581920","tmdb":100088}}

TraktSerializationService.SerializeAsync() has a new optional boolean parameter indentation, which indents the JSON output like this:

string json = await TraktSerializationService.SerializeAsync(show, indentation: true);
{
    "title":"The Last of Us",
    "year":2023,
    "ids":
    {
        "trakt":158947,
        "slug":"the-last-of-us",
        "tvdb":392256,
        "imdb":"tt3581920",
        "tmdb":100088
    }
}

Added

  • Support for new Trakt API Endpoints
    • Add support for "movies/recommended/{period}" GET request (Issue 359)
    • Add support for "people/updates/{start_date}" GET request (Issue 360)
    • Add support for "people/updates/id/{start_date}" GET request (Issue 361)
    • Add support for "shows/recommended/{period}" GET request (Issue 362)
    • Add support for "shows/{id}/certifications" GET request (Issue 363)
    • Add support for "movies/{id}/studios" GET request (Issue 407)
    • Add support for "shows/{id}/studios" GET request (Issue 408)
    • Add support for "users/{id}/lists/{list_id}/items/{list_item_id}" PUT request (Issue 484)
    • Add support for "sync/watchlist/{list_item_id}" PUT request (Issue 485)
    • Add support for "sync/favorites/{list_item_id}" PUT request (Issue 486)
    • Add support for "lists/{id}/like" POST request (Issue 585)
    • Add support for "lists/{id}/like" DELETE request (Issue 586)
    • Add support for "users/{id}/notes/{type}" GET request (Issue 597)
    • Add support for "sync/watchlist" PUT request (Issue 599)
    • Add support for "sync/favorites" PUT request (Issue 600)
    • Add support for "movies/{id}/refresh" POST request (Issue 630)
    • Add support for "shows/{id}/refresh" POST request (Issue 631)
    • Add support for "notes" POST request (Issue 632)
    • Add support for "notes/{id}" GET request (Issue 633)
    • Add support for "notes/{id}" PUT request (Issue 634)
    • Add support for "notes/{id}" DELETE request (Issue 635)
    • Add support for "notes/{id}/item" GET request (Issue 636)
    • Add support for "users/{id}/watchlist/comments/{sort}" GET request (Issue 638)
    • Add support for "users/{id}/favorites/comments/{sort}" GET request (Issue 639)
  • Missing Properties in JSON objects
    • Update properties in ITraktSyncLastActivities (Issue 364)
    • Add support for property "updated_at" in ITraktPerson (Issue 406)
    • Update properties in ITraktConnections (Issue 440)
    • Add properties for "vip" and "comments" in TraktExtendedInfo (Issue 460)
    • Add properties for "share_link" and "type" in ITraktList (Issue 462)
    • Add property for "user_stats" in ITraktComment (Issue 464)
    • Add property for "country" in ITraktTranslation (Issue 468)
    • Add property for "title" in ITraktSeasonProgress (Issue 475)
    • Add missing properties in ITraktSyncLastActivities (Issue 478)
    • Add property for "list" in ITraktListItemsReorderPostResponse (Issue 479)
    • Add property for "id" in ITraktRecommendation (Issue 480)
    • Add property for "rank" in ITraktUserSavedFilter (Issue 481)
    • Add property for "user" in TraktHiddenItemType (Issue 482)
    • Add property for "user" in ITraktUserHiddenItem (Issue 483)
    • Add properties for "country" and "ids" in ITraktNetwork (Issue 519)
    • Add missing properties in ITraktSyncLastActivities (Issue 606)
    • Add missing properties in ITraktUserLimits (Issue 608)
    • Add "Show.Tagline" field (Issue 615)
    • Add support for episode type (Issue 622)

Improved

  • Add methods in modules to stream multiple results (Issue 416)
  • Add method overloads in post builder API (Issue 421)
  • Add method overloads in modules to be more flexible with "id or slug" parameters (Issue 452)
  • Add enumeration type for "gender" property in ITraktPerson (Issue 458)
  • Add enumeration type for "known_for_department" property in ITraktPerson (Issue 459)
  • Add enumeration type TraktListPrivacy for ITraktLists (Issue 461)
  • Add boolean parameters "showSignupPage" and "forceLoginPrompt" in TraktAuthenticationModule.CreateAuthorizationUrl() (Issue 463)
  • Add parameter TraktExtendedInfo in TraktListsModule.GetListLikesAsync() (Issue 467)
  • Add enumeration type TraktExtendedCommentSortOrder for TraktMoviesModule.GetMovieCommentsAsync() and TraktEpisodesModule.GetEpisodeCommentsAsync() (Issue 469)
  • Add enumeration type TraktShowsCommentSortOrder for TraktShowsModule.GetShowCommentsAsync() and TraktSeasonsModule.GetSeasonCommentsAsync() (Issue 474)
  • Add parameter TraktExtendedInfo in TraktCommentsModule.GetCommentAsync() (Issue 487)
  • Add parameter TraktExtendedInfo in TraktListsModule.GetTrendingListsAsync() (Issue 488)
  • Add parameter TraktExtendedInfo in TraktListsModule.GetPopularListsAsync() (Issue 489)
  • Add parameter TraktExtendedInfo in TraktListsModule.GetListAsync() (Issue 490)
  • Add parameter TraktExtendedInfo in TraktListsModule.GetListCommentsAsync() (Issue 491)
  • Add parameter TraktExtendedInfo in TraktMoviesModule.GetMovieListsAsync() (Issue 492)
  • Add parameter TraktExtendedInfo in TraktPeopleModule.GetPersonListsAsync() (Issue 493)
  • Add parameter TraktExtendedInfo in TraktCommentsModule.GetCommentRepliesAsync() (Issue 494)
  • Add parameter TraktExtendedInfo in TraktMoviesModule.GetMovieCommentsAsync() (Issue 495)
  • Add parameter TraktExtendedInfo in TraktShowsModule.GetShowCommentsAsync() (Issue 496)
  • Add parameter TraktExtendedInfo in TraktShowsModule.GetShowListsAsync() (Issue 497)
  • Add parameter TraktExtendedInfo in TraktSeasonsModule.GetSeasonCommentsAsync() (Issue 498)
  • Add parameter TraktExtendedInfo in TraktSeasonsModule.GetSeasonListsAsync() (Issue 499)
  • Add parameter TraktExtendedInfo in TraktEpisodesModule.GetEpisodeCommentsAsync() (Issue 500)
  • Add parameter TraktExtendedInfo in TraktEpisodesModule.GetEpisodeListsAsync() (Issue 501)
  • Additional user information can be retrieved with ?extended=full,vip (Issue 502)
  • Use TraktSortBy and TraktSortHow in ITraktList (Issue 526)
  • Support pagination in Recommendations (Issue 644)

Fixed

  • Use ITraktUserPersonalListItemsRemovePost instead of ITraktUserPersonalListItemsPost in TraktUsersModule.RemovePersonalListItemsAsync() (Issue 373)
  • Use ITraktSyncCollectionRemovePost instead of ITraktSyncCollectionPost in TraktSyncModule.RemoveCollectionItemsAsync() (Issue 374)
  • Use ITraktSyncRatingsRemovePost instead of ITraktSyncRatingsPost in TraktSyncModule.RemoveRatingsAsync() (Issue 375)
  • Use ITraktSyncRecommendationsRemovePost instead of ITraktSyncRecommendationsPost in TraktSyncModule.RemovePersonalRecommendationsAsync() (Issue 376)
  • Use ITraktSyncWatchlistRemovePost instead of ITraktSyncWatchlistPost in TraktSyncModule.RemoveWatchlistItemsAsync() (Issue 377)
  • Use ITraktUserHiddenItemsRemovePost instead of ITraktUserHiddenItemsPost in TraktUsersModule.RemoveHiddenItemsAsync() (Issue 378)
  • Change ITraktShowFilter to support "network_ids" instead of "networks" (Issue 520)
  • Automatically force OAuth authorization for the user "me" (Issue 596)
  • ITraktAuthorization.TokenType might be null (Issue 602)

Breaking Changes

  • Replace IEnumerable<T> with IList<T> where possible (Issue 253)
  • Move multiple query parameters into namespace TraktNet.Parameters (Issue 368)
  • New return types for GetMovieRecommendationsAsync() and GetShowRecommendationsAsync() (Issue 439)
  • Add new return type for TraktListsModule.GetTrendingListsAsync() and TraktListsModule.GetPopularListsAsync() requests (Issue 466)
  • Rename "movies/recommended/{period}" to "movies/favorited/{period}" GET request (Issue 522)
  • Rename "shows/recommended/{period}" to "shows/favorited/{period}" GET request requests (Issue 523)
  • Rename users/{id}/recommendations/{type}/{sort} request to users/{id}/favorites/{type}/{sort} (Issue 555)
  • Rename sync/recommendations requests to sync/favorites (Issue 556)
  • Rename ITraktRecommendedBy to ITraktFavoritedBy (Issue 557)

Deprecated:

New Contributors

Full Changelog: v1.3.0...v1.4.0