Forked from: https://github.com/dkorunic/gomdb with some updates.
Find a file
Christopher Herrera 561e54fa87 updating README.md
Adding the travis build badge and also changing the godoc reference to the top.
2016-06-20 14:19:23 -04: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 Checking for invalid category 2016-06-15 12:29:01 +05:30
gomdb_test.go Checking for invalid category 2016-06-15 12:29:01 +05:30
LICENSE Fixed: Removed executable permissions from files 2016-06-14 19:55:32 +05:30
README.md updating README.md 2016-06-20 14:19:23 -04: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() {
	query := &gomdb.QueryData{Title: "Macbeth", SearchType: gomdb.MovieSearch}
	res, err := gomdb.Search(query)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(res.Search)

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

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

See the project documentation to see the Response Objects and stuff