Git Product home page Git Product logo

Comments (1)

henrikfroehling avatar henrikfroehling commented on May 27, 2024

@aspik This scenario should work as aspected. The ITraktSyncHistoryPost can hold a collection of ITraktSyncHistoryPostShow, which can each hold a collection of ITraktSyncHistoryPostShowSeason which can each hold a collection of ITraktSyncHistoryPostShowEpisode. ITraktSyncHistoryPostShow, ITraktSyncHistoryPostShowSeason and ITraktSyncHistoryPostShowEpisode already have a property WatchedAt.

To build a ITraktSyncHistoryPost, use the TraktSyncHistoryPostBuilder. For this case you can use the AddShow(ITraktShow show, PostHistorySeasons seasons) or the AddShow(ITraktShow show, DateTime watchedAt, PostHistorySeasons seasons)method.

PostHistorySeasons is a collection of PostHistorySeason and PostHistorySeason is a collection of PostHistoryEpisode.

Example:

var postHistorySeasons = new PostHistorySeasons
{
    1, // season number
    { 2 }, // season number
    { 3, DateTime.Now }, // season number, season watchedAt
    { 4, new PostHistoryEpisodes { 1 } }, // season number, { episode number }
    { 5, DateTime.Now, new PostHistoryEpisodes { 2 } }, // season number, season watchedAt, { episode number }
    { 6, new PostHistoryEpisodes { 1, 2, 3 } }, // season number, { multiple episode numbers }
    { 7, DateTime.Now, new PostHistoryEpisodes { 1, 2, 3 } }, // season number, season watchedAt { multiple episode numbers }
    { 8, new PostHistoryEpisodes // season number
         {
             { 1, DateTime.Now } // episode number, episode watchedAt
         }
    },
    { 9, DateTime.Now, new PostHistoryEpisodes // season number, season watchedAt
         {
             { 2, DateTime.Now } // episode number, episode watchedAt
         }
    },
    { 10, new PostHistoryEpisodes // season number
         {
             { 1, DateTime.Now }, // episode number, episode watchedAt
             2,
             { 3, DateTime.Now } // episode number, episode watchedAt
         }
    },
    { 11, DateTime.Now, new PostHistoryEpisodes // season number, season watchedAt
         {
             { 2, DateTime.Now  }, // episode number, episode watchedAt
             { 3 }, // episode number
             4 // episode number
         }
    },
};

PostHistorySeasons and PostHistoryEpisodes each also have an Add(...) method for their collection items with several overloads.

from trakt.net.

Related Issues (20)

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.