MaxHasADHD / TraktKit

Swift wrapper for Trakt.tv API.
MIT License
112 stars 37 forks source link

Ported TraktKit to tvOS #36

Open Michelasso opened 5 years ago

Michelasso commented 5 years ago

Converted frameworks to Universal frameworks Added test for tvOS and macOS

I have also changed a couple of other things. For example I couldn't fetch the avatars, the "user" structure (If I remember correctly. I had actually changed it nearly a year ago and ported the change to this new fork). needed to be more nested.

Also I renamed "set" to "setOauth2RedirectURL", just deprecating the old "set". But I can revert it if you don't like the new name, it just made more sense to me.

Now with Universal Frameworks one just need to add

import TraktKit

no matter the OS type. Thanks to this now all tests are common for iOS, tvOS and macOS (same source files, I just added the targets) and most important, they all succeeded. Also the prototype app I was developing compiled and run without any issue (and using all my modifications).

This is more or less the same work I did for TheMovieDatabaseSwiftWrapper, which has been merged months ago.

Last thing: I had also modified "getUserWatchedHistory" adding the pagination, but when I ported my old function it gave an error compiling. Also I am a bit lost, because I see there is a "getHistory". Are they any different (I have checked the Trakt TV APIs and I must have missed "getHistory")? Should I make a new pull request (after this one) to add the pagination in "getUserWatchedHistory"?

Michelasso commented 5 years ago

Please wait to merge. I have a couple of issues coming from bad copy&paste. Also I am cleaning it a bit from my comments

Michelasso commented 5 years ago

Ok, it should be fine, now. I forgot to mention that I also added the methods "getDeviceCode" and "getTokenFromDeviceCode", useful to login with a code (to insert via a web browser after authenticating).

All tests are working, just giving a warning because I deprecate "set()" as explained above.

Also it has been "ported" by Xcode to Swift 5.0 (Xcode made no changes to the source code).

MaxHasADHD commented 4 years ago

Sorry for the wait on this. I became pretty burnt out. I'll try to be more active when I can.

Michelasso commented 4 years ago

Yeah, I am pretty busy myself, now. Working online from home. Also I didn't touch the project for quite a long time. IB for tvOS went banana with Xcode 11.

So how does it work? Should I apply the changes requested and update?

MaxHasADHD commented 3 years ago

@Michelasso if you can, yes. Resolve the conflicts, and address comments. No rush though