func (api *OmdbApi) MovieByImdbID(id string) (*MovieResult, error) {
	resp, err := api.requestAPI("id", id)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	r := new(MovieResult)
	err = json.NewDecoder(resp.Body).Decode(r)
	if err != nil {
		return nil, err
	}
	if r.Response == "False" {
		return r, errors.New(r.Error)
	}
	return r, nil
}
MovieByImdbID returns a MovieResult given a ImdbID ex:"tt2015381"
package gomdb
import (
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"net/url"
)
const (
	baseURL  = "http://www.omdbapi.com/?"
	plot     = "full"
	tomatoes = "true"
	MovieSearch   = "movie"
	SeriesSearch  = "series"
	EpisodeSearch = "episode"
)
type OmdbApi struct {
	apiKey string
}
func Init(apiKey string) *OmdbApi {
	return &OmdbApi{apiKey: apiKey}
}
type QueryData struct {
	Title      string
	Year       string
	ImdbId     string
	SearchType string
}
type SearchResult struct {
	Title  string
	Year   string
	ImdbID string
	Type   string
}
type SearchResponse struct {
	Search       []SearchResult
	Response     string
	Error        string
	totalResults int
}
type MovieResult struct {
	Title             string
	Year              string
	Rated             string
	Released          string
	Runtime           string
	Genre             string
	Director          string
	Writer            string
	Actors            string
	Plot              string
	Language          string
	Country           string
	Awards            string
	Poster            string
	Metascore         string
	ImdbRating        string
	ImdbVotes         string
	ImdbID            string
	Type              string
	TomatoMeter       string
	TomatoImage       string
	TomatoRating      string
	TomatoReviews     string
	TomatoFresh       string
	TomatoRotten      string
	TomatoConsensus   string
	TomatoUserMeter   string
	TomatoUserRating  string
	TomatoUserReviews string
	TomatoURL         string
	DVD               string
	BoxOffice         string
	Production        string
	Website           string
	Response          string
	Error             string
}
func (api *OmdbApi) Search(query *QueryData) (*SearchResponse, error) {
	resp, err := api.requestAPI("search", query.Title, query.Year, query.SearchType)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	r := new(SearchResponse)
	err = json.NewDecoder(resp.Body).Decode(r)
	if err != nil {
		return nil, err
	}
	if r.Response == "False" {
		return r, errors.New(r.Error)
	}
	return r, nil
}
func (api *OmdbApi) MovieByTitle(query *QueryData) (*MovieResult, error) {
	resp, err := api.requestAPI("title", query.Title, query.Year, query.SearchType)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	r := new(MovieResult)
	err = json.NewDecoder(resp.Body).Decode(r)
	if err != nil {
		return nil, err
	}
	if r.Response == "False" {
		return r, errors.New(r.Error)
	}
	return r, nil
}