Update docs in regards to 4319c85
.
This commit is contained in:
parent
4319c85503
commit
5f94d77032
1 changed files with 20 additions and 2 deletions
20
README.md
20
README.md
|
@ -32,6 +32,7 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
api := gomdb.Init(YOUR_API_KEY)
|
api := gomdb.Init(YOUR_API_KEY)
|
||||||
|
|
||||||
query := &gomdb.QueryData{Title: "Macbeth", SearchType: gomdb.MovieSearch}
|
query := &gomdb.QueryData{Title: "Macbeth", SearchType: gomdb.MovieSearch}
|
||||||
res, err := api.Search(query)
|
res, err := api.Search(query)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -48,13 +49,30 @@ func main() {
|
||||||
}
|
}
|
||||||
fmt.Println(res2)
|
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 {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Println(res3)
|
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)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue