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 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
    );

    @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
    );

}

@@ -230,16 +230,41 @@
 TvShow;%0A
+%0Aimport java.util.List;%0A%0A
 import r
@@ -507,31 +507,24 @@
 ck in. %3Cbr/%3E
-%0A     *
  %3Cbr/%3E%0A     
@@ -739,36 +739,22 @@
 ow.%3Cbr/%3E
-%0A     * %3Cbr/%3E%0A     *
+ %3Cbr/%3E
  %3Cem%3EWar
@@ -760,32 +760,39 @@
 rning%3C/em%3E: This
+%0A     *
  method requires
@@ -1000,21 +1000,21 @@
 ble.
+ After
 %0A     *
- After
  che
@@ -1082,23 +1082,16 @@
 n switch
-%0A     *
  over to
@@ -1098,16 +1098,23 @@
  watched
+%0A     *
  status 
@@ -1152,28 +1152,14 @@
 br/%3E
-%0A     * %3Cbr/%3E%0A     *
+ %3Cbr/%3E
  %3Cem
@@ -1187,32 +1187,39 @@
 ethod requires a
+%0A     *
  developer API k
@@ -1329,32 +1329,411 @@
 checkin%0A    );%0A%0A
+    /**%0A     * Add episodes watched outside of trakt to your library.%0A     */%0A    @POST(%22/show/episode/seen/%7Bapikey%7D%22)%0A    void episodeSeen(%0A            @Body Episodes episodes%0A    );%0A%0A    /**%0A     * Remove episodes watched outside of trakt from your library.%0A     */%0A    @POST(%22/show/episode/unseen/%7Bapikey%7D%22)%0A    void episodeUnseen(%0A            @Body Episodes episodes%0A    );%0A%0A
     @GET(%22/show/
@@ -2208,10 +2208,371 @@
     );%0A%0A
+    public static class Episodes %7B%0A%0A        public String imdb_id;%0A%0A        public Integer tvdb_id;%0A%0A        public String title;%0A%0A        public Integer year;%0A%0A        public List%3CEpisode%3E episodes;%0A%0A        public static class Episode %7B%0A%0A            public int season;%0A%0A            public int episode;%0A%0A            public String last_played;%0A        %7D%0A    %7D%0A%0A
 %7D%0A

Add show/episode/seen and show/episode/unseen.