From 5f94d7703235f122318a39a7f2972560a25344e1 Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Tue, 19 Mar 2019 10:52:20 +0100 Subject: [PATCH] Update docs in regards to 4319c85. --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 372bea7..205cf9f 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,8 @@ import ( ) func main() { - api := gomdb.Init(YOUR_API_KEY) + api := gomdb.Init(YOUR_API_KEY) + query := &gomdb.QueryData{Title: "Macbeth", SearchType: gomdb.MovieSearch} res, err := api.Search(query) if err != nil { @@ -48,13 +49,30 @@ func main() { } fmt.Println(res2) - res3, err := api.MovieByImdbID("tt2884018") + query = &gomdb.QueryData{Title: "Rick and Morty", Season: "1", Episode: "8", SearchType: gomdb.EpisodeSearch} + res3, err := api.MovieByTitle(query) if err != nil { fmt.Println(err) return } fmt.Println(res3) } + + query = &gomdb.QueryData{ImdbId: "tt2884018"} + res4, err := api.MovieByImdbID(query) + if err != nil { + fmt.Println(err) + return + } + fmt.Println(res4) + + query = &gomdb.QueryData{ImdbId: "tt0944947", Season: "1", Episode: "1", SearchType: gomdb.EpisodeSearch} + res5, err := api.MovieByImdbID(query) + if err != nil { + fmt.Println(err) + return + } + fmt.Println(res5) ```