Update docs in regards to 4319c85.

This commit is contained in:
Dinko Korunic 2019-03-19 10:52:20 +01:00
parent 4319c85503
commit 5f94d77032

View file

@ -32,6 +32,7 @@ import (
func main() {
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)
```