Documentation ¶
Index ¶
- type Album
- type AlbumsResponse
- type Artist
- type ArtistsResponse
- type AudioGetAlbumsResponse
- type AudioGetArtistsResponse
- type AudioGetSongsResponse
- type Client
- func (k *Client) AudioGetAlbums() (*AudioGetAlbumsResponse, error)
- func (k *Client) AudioGetArtists() (*AudioGetArtistsResponse, error)
- func (k *Client) AudioGetSongs() (*AudioGetSongsResponse, error)
- func (k *Client) Ping() (*PingResponse, error)
- func (k *Client) ShowNotification(title string, message string) (*ShowNotificationResponse, error)
- func (k *Client) VideoGetMovies() (*VideoGetMoviesResponse, error)
- func (k *Client) VideoGetMoviesGenres() (*VideoGetGenresResponse, error)
- func (k *Client) VideoGetTVShows() (*VideoGetTVShowsResponse, error)
- func (k *Client) VideoGetTVShowsGenres() (*VideoGetGenresResponse, error)
- type ErrorData
- type ErrorStack
- type Genre
- type GenresResponse
- type ListLimitsReturned
- type Movie
- type MoviesResponse
- type PingResponse
- type Request
- type ResponseBase
- type ResponseError
- type ShowNotificationResponse
- type Song
- type SongsResponse
- type TVShow
- type TVShowsResponse
- type VideoGetGenresResponse
- type VideoGetMoviesResponse
- type VideoGetTVShowsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumsResponse ¶
type AlbumsResponse struct { Albums []Album `json:"albums,omitempty"` Limits *ListLimitsReturned `json:"limits,omitempty"` }
type Artist ¶
type Artist struct { Artist string `json:"artist,omitempty"` ArtistID int `json:"artistid"` Label string `json:"label,omitempty"` }
Artist define the Kodi artist entity
type ArtistsResponse ¶
type ArtistsResponse struct { Artists []Artist `json:"artists,omitempty"` Limits *ListLimitsReturned `json:"limits,omitempty"` }
ArtistsResponse define the Kodi artists list response
type AudioGetAlbumsResponse ¶
type AudioGetAlbumsResponse struct { ResponseBase Result AlbumsResponse `json:"result,omitempty"` }
type AudioGetArtistsResponse ¶
type AudioGetArtistsResponse struct { ResponseBase Result ArtistsResponse `json:"result,omitempty"` }
AudioGetArtistsResponse define the response to the GetArtists RPC call
type AudioGetSongsResponse ¶
type AudioGetSongsResponse struct { ResponseBase Result SongsResponse `json:"result,omitempty"` }
type Client ¶
Client defines the Kodi API client
func (*Client) AudioGetAlbums ¶
func (k *Client) AudioGetAlbums() (*AudioGetAlbumsResponse, error)
AudioGetAlbums make a RPC call to retrieve all albums
func (*Client) AudioGetArtists ¶
func (k *Client) AudioGetArtists() (*AudioGetArtistsResponse, error)
AudioGetArtists make a RPC call to retrieve all artists
func (*Client) AudioGetSongs ¶
func (k *Client) AudioGetSongs() (*AudioGetSongsResponse, error)
AudioGetSongs make a RPC call to retrieve all songs
func (*Client) Ping ¶
func (k *Client) Ping() (*PingResponse, error)
Ping make a RPC call to the Ping responsder
func (*Client) ShowNotification ¶
func (k *Client) ShowNotification(title string, message string) (*ShowNotificationResponse, error)
ShowNotification make a RPC call to shows a GUI notification
func (*Client) VideoGetMovies ¶
func (k *Client) VideoGetMovies() (*VideoGetMoviesResponse, error)
VideoGetMovies make a RPC call to retrieve all movies
func (*Client) VideoGetMoviesGenres ¶
func (k *Client) VideoGetMoviesGenres() (*VideoGetGenresResponse, error)
VideoGetMoviesGenres make a RPC call to retrieve all genres for movies
func (*Client) VideoGetTVShows ¶
func (k *Client) VideoGetTVShows() (*VideoGetTVShowsResponse, error)
VideoGetTVShows make a RPC call to retrieve all TV shows
func (*Client) VideoGetTVShowsGenres ¶
func (k *Client) VideoGetTVShowsGenres() (*VideoGetGenresResponse, error)
VideoGetTVShowsGenres make a RPC call to retrieve all genres for TV shows
type ErrorData ¶
type ErrorData struct { Method string `json:"method"` Stack *ErrorStack `json:"stack"` }
ErrorData define some additional information about the error.
type ErrorStack ¶
type ErrorStack struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Message string `json:"message,omitempty"` Property *ErrorStack `json:"property,omitempty"` }
ErrorStack define sonme errors informations
type GenresResponse ¶
type GenresResponse struct { Genres []Genre `json:"genres,omitempty"` Limits *ListLimitsReturned `json:"limits,omitempty"` }
type ListLimitsReturned ¶
type ListLimitsReturned struct { Total int `json:"total"` Start int `json:"start,omitempty"` End int `json:"end,omitempty"` }
ListLimitsReturned define a Kodi entity for list informations
type MoviesResponse ¶
type MoviesResponse struct { Movies []Movie `json:"movies,omitempty"` Limits *ListLimitsReturned `json:"limits,omitempty"` }
type PingResponse ¶
type PingResponse struct { ResponseBase Result string `json:"result,omitempty"` }
PingResponse define a response after a Ping RPC call
type Request ¶
type Request struct { Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` ID int64 `json:"id"` Params interface{} `json:"params,omitempty"` }
Request define the object sended to the server for the JSONRPC call
type ResponseBase ¶
type ResponseBase struct { Jsonrpc string `json:"jsonrpc,omitempty"` Method string `json:"method,omitempty"` ID int64 `json:"id,omitempty"` Error *ResponseError `json:"error,omitempty"` }
ResponseBase define the base JSON object response after a JSONRPC call
type ResponseError ¶
type ResponseError struct { Code int `json:"code"` Message string `json:"message"` Data *ErrorData `json:"data,omitempty"` }
ResponseError define the error member of the response when a rpc call encounters an error
type ShowNotificationResponse ¶
type ShowNotificationResponse struct { ResponseBase Result string `json:"result,omitempty"` }
ShowNotificationResponse define a response after a ShowNotification RPC call
type SongsResponse ¶
type SongsResponse struct { Songs []Song `json:"songs,omitempty"` Limits *ListLimitsReturned `json:"limits,omitempty"` }
type TVShowsResponse ¶
type TVShowsResponse struct { TVShows []TVShow `json:"tvshows,omitempty"` Limits *ListLimitsReturned `json:"limits,omitempty"` }
type VideoGetGenresResponse ¶
type VideoGetGenresResponse struct { ResponseBase Result GenresResponse `json:"result,omitempty"` }
type VideoGetMoviesResponse ¶
type VideoGetMoviesResponse struct { ResponseBase Result MoviesResponse `json:"result,omitempty"` }
type VideoGetTVShowsResponse ¶
type VideoGetTVShowsResponse struct { ResponseBase Result TVShowsResponse `json:"result,omitempty"` }