Defines Lush API interface using Retrofit. @author Jamie Cruwys
| 18 | * @author Jamie Cruwys |
| 19 | */ |
| 20 | public interface LushAPI |
| 21 | { |
| 22 | /** |
| 23 | * Get a list of the channels |
| 24 | * @return channels |
| 25 | */ |
| 26 | @GET("channels") |
| 27 | Call<List<Channel>> getChannels(); |
| 28 | |
| 29 | /** |
| 30 | * Get programmes for a channel |
| 31 | * @param channelTag to get the programmes for |
| 32 | * @return programmes |
| 33 | */ |
| 34 | @GET("channels/{channel_tag}") |
| 35 | Call<List<Programme>> getChannelProgrammes(@Path("channel_tag") String channelTag); |
| 36 | |
| 37 | /** |
| 38 | * Gets a list of the events |
| 39 | * @return events |
| 40 | */ |
| 41 | @GET("events") |
| 42 | Call<List<Event>> getEvents(); |
| 43 | |
| 44 | /** |
| 45 | * Gets programmes for a event |
| 46 | * @param eventTag to get the programmes for |
| 47 | * @return programmes |
| 48 | */ |
| 49 | @GET("events/{event_tag}") |
| 50 | Call<List<Programme>> getEventProgrammes(@Path("event_tag") String eventTag); |
| 51 | |
| 52 | /** |
| 53 | * Gets programmes for a tag |
| 54 | * @param tag to get the programmes for |
| 55 | * @return programmes |
| 56 | */ |
| 57 | @GET("tags/{tag}") |
| 58 | Call<List<Programme>> getProgrammesForTag(@Path("tag") String tag); |
| 59 | |
| 60 | /** |
| 61 | * Performs a text search and returns up to six results |
| 62 | * @param searchTerms, which supports multiple strings if they are separated by at + symbol |
| 63 | * @return results |
| 64 | */ |
| 65 | @GET("programme-search/{search_terms}") |
| 66 | Call<List<Programme>> search(@Path("search_terms") String searchTerms); |
| 67 | |
| 68 | /** |
| 69 | * Gets the live playlist, which contains the live playlist id, or empty for the given timezone offset |
| 70 | * @param offset for the timezone, in the format "x minutes" |
| 71 | * @return live playlist content |
| 72 | */ |
| 73 | @GET("views/playlist") |
| 74 | Call<List<LivePlaylist>> getLivePlaylist(@Query("offset") String offset); |
| 75 | |
| 76 | /** |
| 77 | * Gets a list of the latest tv programmes |
no outgoing calls
no test coverage detected