package com.jakewharton.trakt.services;

import com.jakewharton.trakt.entities.Checkin;
import com.jakewharton.trakt.entities.CheckinResponse;
import com.jakewharton.trakt.entities.Response;
import com.jakewharton.trakt.entities.TvShow;

import java.util.List;

import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Path;

/**
 * Endpoints for Show.
 */
public interface ShowService {

    /**
     * Notify trakt that a user wants to cancel their current check in. <br/> <br/>
     * <em>Warning</em>: This method requires a developer API key.
     */
    @POST("/show/cancelcheckin/{apikey}")
    Response cancelcheckin();

    /**
     * Notify trakt that a user has stopped watching a show.<br/> <br/> <em>Warning</em>: This
     * method requires a developer API key.
     */
    @POST("/show/cancelwatching/{apikey}")
    Response cancelwatching();

    /**
     * Check into a show on trakt. Think of this method as in between a seen and a scrobble. After
     * checking in, trakt will automatically display it as watching then switch over to watched
     * status once the duration has elapsed.<br/> <br/> <em>Warning</em>: This method requires a
     * developer API key.
     */
    @POST("/show/checkin/{apikey}")
    CheckinResponse checkin(
            @Body Checkin checkin
    );

    /**
     * Add episodes to your library collection.
     */
    @POST("/show/episode/library/{apikey}")
    void episodeLibrary(
            @Body Episodes episodes
    );

    /**
     * Remove episodes from your library collection.
     */
    @POST("/show/episode/unlibrary/{apikey}")
    void episodeUnlibrary(
            @Body Episodes episodes
    );

    /**
     * Add episodes watched outside of trakt to your library.
     */
    @POST("/show/episode/seen/{apikey}")
    void episodeSeen(
            @Body Episodes episodes
    );

    /**
     * Remove episodes watched outside of trakt from your library.
     */
    @POST("/show/episode/unseen/{apikey}")
    void episodeUnseen(
            @Body Episodes episodes
    );

    @GET("/show/summary.json/{apikey}/{title}")
    TvShow summary(
            @Path("title") String slug
    );

    @GET("/show/summary.json/{apikey}/{title}")
    TvShow summary(
            @Path("title") int tvdbId
    );

    @GET("/show/summary.json/{apikey}/{title}/extended")
    TvShow summaryExtended(
            @Path("title") String slug
    );

    @GET("/show/summary.json/{apikey}/{title}/extended")
    TvShow summaryExtended(
            @Path("title") int tvdbId
    );

    public static class Episodes {

        public String imdb_id;

        public Integer tvdb_id;

        public String title;

        public Integer year;

        public List<Episode> episodes;

        public static class Episode {

            public int season;

            public int episode;

            public String last_played;
        }
    }

}

@@ -2071,32 +2071,418 @@
 pisodes%0A    );%0A%0A
+    /**%0A     * Add all episodes for a season to your library collection.%0A     */%0A    @POST(%22/show/season/library/%7Bapikey%7D%22)%0A    void seasonLibrary(%0A            @Body Season season%0A    );%0A%0A    /**%0A     * Add all episodes from a season watched outside of trakt to your library.%0A     */%0A    @POST(%22/show/library/seen/%7Bapikey%7D%22)%0A    void seasonSeen(%0A            @Body Season season%0A    );%0A%0A
     @GET(%22/show/
@@ -2505,32 +2505,32 @@
 ikey%7D/%7Btitle%7D%22)%0A
-
     TvShow summa
@@ -2981,24 +2981,20 @@
 c class 
-Episodes
+Show
  %7B%0A%0A    
@@ -3080,24 +3080,24 @@
 ing title;%0A%0A
-
         publ
@@ -3112,16 +3112,153 @@
 er year;
+%0A    %7D%0A%0A    public static class Season extends Show %7B%0A%0A        public int season;%0A%0A    %7D%0A%0A    public static class Episodes extends Show %7B
 %0A%0A      

Add show/season/library and show/season/seen.