Forked from: https://github.com/dkorunic/gomdb with some updates.
Find a file
Dinko Korunic 4319c85503 - Cleanup baseURL
- Extend QueryData to be able to use s and i queries with Season and
  Episode parameters
- Exnted MovieByImdbID() to include Season and Episode where
  appropriate,
- Refactor MovieByImdbID() to use QueryData as per standard API which
  also permits SearchType, Season and Episode filters
- Update unit tests for API changes
2019-03-19 10:41:02 +01:00
.gitignore adding/updating gitignore 2016-06-20 12:21:36 -04:00
.travis.yml adding travis config 2016-06-20 13:59:07 -04:00
gomdb.go - Cleanup baseURL 2019-03-19 10:41:02 +01:00
gomdb_test.go - Cleanup baseURL 2019-03-19 10:41:02 +01:00
LICENSE Fixed: Removed executable permissions from files 2016-06-14 19:55:32 +05:30
README.md add support for API keys 2017-05-24 13:33:12 +01:00

The Golang Omdb API

Build Status GoDoc

Author: Christopher T. Herrera (eefretsoul AT gmail DOT com)

This API uses the omdbapi.com API by Brian Fritz


OMDBAPI.com

This is an excellent open database for movie and film content.

I strongly encourage you to check it out and contribute to keep it growing.

http://www.omdbapi.com


Project Usage

The API usage is very simple.

package main

import (
	"fmt"
	"github.com/eefret/gomdb"
)

func main() {
        api := gomdb.Init(YOUR_API_KEY)
	query := &gomdb.QueryData{Title: "Macbeth", SearchType: gomdb.MovieSearch}
	res, err := api.Search(query)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(res.Search)

	query = &gomdb.QueryData{Title: "Macbeth", Year: "2015"}
	res2, err := api.MovieByTitle(query)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(res2)

	res3, err := api.MovieByImdbID("tt2884018")
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(res3)
}

See the project documentation to see the Response Objects and stuff