Git Product home page Git Product logo

traktapisharp's Introduction

Hi, I'm Henrik ๐Ÿ‘‹

  • C#, C++ and Pascal / Delphi Developer
  • Iโ€™m currently working on Trakt.NET
  • I'm currently learning compiler architectures

๐Ÿ’ฌ Ask me about C++, C#, .NET and / or Delphi

Languages & Frameworks & Tools

GitHub Stats

GitHub stats GitHub Streak

Languages

traktapisharp's People

Contributors

henrikfroehling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

traktapisharp's Issues

Version 1.0.0 ToDo

ToDo

Version 1.0.0 Alpha 1

  • #17 New and better request implementation
  • #44 New and better response implementation
  • #34 Convert PCL to .NET Standard

Version 1.0.0 Alpha 2

  • #18 Reduce indirections in object properties
  • #20 Optimize deserialization of json data
  • #43 Remove Images option in TraktExtendedInfo
  • #59 System.NullReferenceException When getting popular shows

Version 1.0.0 Alpha 3

  • #21 Improve http client handling
  • #69 Add support for "networks" GET request (for version 1.0.0)
  • #70 Add support for "certifications/{type}" GET request (for version 1.0.0)
  • #71 Add support for "users/hidden/{section}" POST request (for version 1.0.0)
  • #72 Add support for "users/hidden/{section}/remove" POST request (for version 1.0.0)
  • #75 Optimize serialization of json data
  • #77 Fix serialization of objects in post builder
  • #78 Implement json deserialization for authorization objects
  • #79 Remove prefix Trakt from internal type names
  • #83 Add missing "network" property in ITraktSeason
  • #87 Move tests from old test project into new test project
  • #88 Add missing "last_episode" property in ITraktShowProgress
  • #89 Add "dolby_atmos" and "dts_x" in TraktMediaAudio
  • #103 Fix module tests
  • #106 Add support for X-Item-ID and X-Item-Type response headers
  • #107 Add support for "comments/{id}/item" GET request
  • #108 Add support for "comments/recent/{comment_type}/{type}" GET request
  • #109 Add support for "comments/{id}/likes" GET request
  • #110 Add missing "country" property in ITraktMovie
  • #111 Add "comment_count" property in ITraktMovie, ITraktShow, ITraktSeason and ITraktEpisode
  • #116 Add support for "people/{id}/lists/{type}/{sort}" GET request
  • #117 Add support for "comments/trending/{comment_type}/{type}?{include_replies}" GET request
  • #118 Add support for "comments/recent/{comment_type}/{type}?{include_replies}" GET request
  • #119 Add support for "comments/updates/{comment_type}/{type}?{include_replies}" GET request
  • #120 Add support for "lists/trending" GET request
  • #121 Add support for "lists/popular" GET request
  • #122 Add support for "include_replies" parameter in "users/id/comments" GET request
  • #123 Make "sort_how" and "sort_by" optional in "users/{id}/lists" and "users/{id}/lists/{list_id}" requests
  • #124 Allow multiple types as filter in "users/{id}/lists/{list_id}/items/{type}" request
  • #129 Add "reset_at" property in ITraktShowWatchedProgress
  • #130 Add flag for "progress_watched_reset" section in TraktHiddenItemsSection

Version 1.0.0 Beta 1

  • #57 Move all examples into their own repository
  • #58 Rename library / project / repository to "Trakt.NET"
  • #105 Add tests for object json serialization
  • #134 Improve test coverage

Remove Images option in TraktExtendedInfo

As pointed out in issue #32, images are no longer returned by the Trakt API.

Therefore, remove the Images option in TraktExtendedInfo since it's no longer needed.
User images (TraktUser.Images) are returned, if TraktExtendedInfo.Full is enabled.

Also remove all TraktImages properties in TraktShow, TraktMovie, TraktSeason, TraktEpisode and TraktPerson, except in TraktUser.

Missing sorting headers support

Provided sorting headers (X-Sort-By, X-Sort-How) are not used in following requests:

  • sync-get-watchlist
  • users-get-custom-list-items

New and better response implementation

Rewrite the response system.
Each Trakt response should contain the actual data and a property, which indicates if the request was successful.
Response headers from Trakt should be available in each response.
The user should be able to configure the library, whether an exception will be thrown on failure or if the response should just indicate failure with a property. Currently, requests, which don't return any data, throw an exception on failure and there is no other indication, whether the request was successful or not.

Reduce indirections in object properties

Object properties should be accessible without indirection.
E.g.: The movie properties in a TraktTrendingMovie should be directly accessible without a call to TraktTrendingMovies Movie property.

Add custom attributes

All module comments contain the information, if oauth authorization is required.
Most object properties are nullable.

Both subjects could be improved with custom attributes, such as Nullable or OAuthRequired.

NullReferenceException when serializing TraktAuthorization

When trying to serialize an TraktAuthorization instance with TraktSerializationService, a NullReferenceException is thrown, if the given TraktAuthorization's properties are null.

A workaround would be to make sure, all TraktAuthorization's properties are not null, before serialization.

TraktAuthorization authorization = new TraktAuthorization
{
    AccessToken = string.Empty,
    RefreshToken = string.Empty,
    AccessScope = TraktAccessScope.Public,
    TokenType = TraktAccessTokenType.Bearer
};

string authorizationJson = TraktSerializationService.Serialize(authorization);

How to get Device authorization token

I'm sure I'm just missing something here, but can you help me figure out why I'm getting this exception when I try to poll for authorization?

When I send the values through Postman, everything works just fine so I'm sure it's the way I'm using the TraktClient. Here's my code:

var client = new TraktClient("[id]", "[secret]"); var device = await client.DeviceAuth.GenerateDeviceAsync(); Console.WriteLine(device.UserCode); //go out and actually enter the code and complete the authorization var token = await client.DeviceAuth.PollForAuthorizationAsync();

I receive a TraktForbiddenException: Forbidden -invalid API key or unapproved app. Thoughts?

Trakt.tv API Images removed on October 31, 2016

More information here

The Images-option in TraktExtendedInfo will still be available, but without any effect on media object responses. Therefore, the Images property in TraktShow, TraktMovie and other objects will always be null.
User images (TraktUser.Images) are not effected by this change.

All changes are documented in the Changelog.

For further discussion on the Trakt.tv API visit the Trakt.tv API forum (Google+ account required).

How can I creat a client with our API Key and Username/Password of a user

Hi
sorry, don't found a forum or something other to post my question.

We use our own API to get and set informations to and from Trakt.tv. But we have added only some basic requests and our plan is to switch to your wrapper.

We have a API key for our app (vb.NET), but I don't understand how I can create a client with our API key and username/password that the user fills in settings. Do you can help me with this?

Improve http client handling

Change implementation to allow usage of multiple TraktClients in parallel without conflicting client-ids, -secrets and authorization tokens in http client headers.

Search: Error converting value {null} to type 'System.Int32'. Path '[5].show.year'

I'm using the following statement to search for shows:
TraktPaginationListResult<TraktSearchResult> searchResults = await this.apiClient.Search.GetTextQueryResultsAsync(searchString, TraktApiSharp.Enums.TraktSearchResultType.Show);

If i'm searching for "walking dead" it works fine. but if i only search for "walking" i get the following exception:
An exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in mscorlib.ni.dll but was not handled in user code Additional information: Error converting value {null} to type 'System.Int32'. Path '[5].show.year', line 1, position 4757.

Add method to create TraktAuthorization object manually with correct data

Example usage:

var authorization1 = TraktAuthorization.CreateWith("accessToken");
var authorization2 = TraktAuthorization.CreateWith("accessToken", "refreshToken");

var createdAt = DateTime.Now.AddDays(-30); // 30 days ago
var expiresInSeconds = 3600 * 24 * 90; // 90 days

var authorization3 = TraktAuthorization.CreateWith(createdAt, expiresInSeconds, "accessToken");
var authorization4 = TraktAuthorization.CreateWith(createdAt, expiresInSeconds, "accessToken", "refreshToken");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.