Help us shape the future of Go! Take the 2026 Go Developer Survey

imdb

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 11 Imported by: 0

README

IMDb clients for Crawlora

Official Crawlora client packages for the hosted IMDb API. These clients call Crawlora's hosted API; they do not scrape IMDb locally. Requests use your Crawlora account and CRAWLORA_API_KEY; service usage follows your account billing plan. Crawlora is independent from and not affiliated with or endorsed by IMDb or its owners.

Language packages

For installation and runnable examples, use the README for your language. See the API endpoint and parameter reference for shared operation details.

Create an account at crawlora.net, open the Crawlora console to get an API key, or read the API documentation. Keep CRAWLORA_API_KEY out of source control.

API coverage

The six clients provide access to 30 public API operations. See the API reference for supported operations, parameters, and response details.

License

MIT. See LICENSE.

Documentation

Overview

Package imdb is a focused Go client for Crawlora's IMDb endpoints. API documentation: https://crawlora.net/docs?utm_source=pkg.go.dev&utm_medium=referral&utm_campaign=platform-clients&utm_content=imdb-go-api-docs

Index

Examples

Constants

View Source
const (
	DefaultBaseURL = "https://api.crawlora.net/api/v1"
	Version        = "0.1.1"
)
View Source
const OperationCount = 30

OperationCount reports how many selected-platform operations this module exposes.

Variables

This section is empty.

Functions

func OperationIDs

func OperationIDs() []string

OperationIDs returns the selected operation IDs in stable sorted order.

Types

type Client

type Client struct {
	APIKey     string
	BaseURL    string
	Timeout    time.Duration
	HTTPClient *http.Client
}

Client calls only the operation IDs included in this platform module.

func NewClient

func NewClient(apiKey string) *Client

NewClient creates a client using the supplied API key, or CRAWLORA_API_KEY when empty.

func (*Client) Call

func (c *Client) Call(ctx context.Context, operationID string, params Params) (any, error)

Call executes a selected platform operation by operation ID.

Example
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
	w.Header().Set("Content-Type", "application/json")
	_, _ = w.Write([]byte(`{"ok":true}`))
}))
defer server.Close()

client := NewClient("your-crawlora-api-key")
client.BaseURL = server.URL + "/api/v1"
client.HTTPClient = server.Client()
result, err := client.Call(context.Background(), "imdb-charts", Params{})
if err != nil {
	panic(err)
}
fmt.Println(result.(map[string]any)["ok"])
Output:
true

func (*Client) Charts

func (c *Client) Charts(ctx context.Context, params Params) (any, error)

Charts calls the imdb-charts operation.

func (*Client) Close

func (c *Client) Close() error

Close releases idle connections held by the configured HTTP transport.

func (*Client) ImageTypes

func (c *Client) ImageTypes(ctx context.Context, params Params) (any, error)

ImageTypes calls the imdb-image-types operation.

func (*Client) Name

func (c *Client) Name(ctx context.Context, params Params) (any, error)

Name calls the imdb-name operation.

func (*Client) NameAwards

func (c *Client) NameAwards(ctx context.Context, params Params) (any, error)

NameAwards calls the imdb-name-awards operation.

func (*Client) NameCredits

func (c *Client) NameCredits(ctx context.Context, params Params) (any, error)

NameCredits calls the imdb-name-credits operation.

func (*Client) NameImages

func (c *Client) NameImages(ctx context.Context, params Params) (any, error)

NameImages calls the imdb-name-images operation.

func (*Client) NameVideos

func (c *Client) NameVideos(ctx context.Context, params Params) (any, error)

NameVideos calls the imdb-name-videos operation.

func (*Client) Search

func (c *Client) Search(ctx context.Context, params Params) (any, error)

Search calls the imdb-search operation.

func (*Client) SearchTitle

func (c *Client) SearchTitle(ctx context.Context, params Params) (any, error)

SearchTitle calls the imdb-search-title operation.

func (*Client) Title

func (c *Client) Title(ctx context.Context, params Params) (any, error)

Title calls the imdb-title operation.

func (*Client) TitleAwards

func (c *Client) TitleAwards(ctx context.Context, params Params) (any, error)

TitleAwards calls the imdb-title-awards operation.

func (*Client) TitleBoxOffice

func (c *Client) TitleBoxOffice(ctx context.Context, params Params) (any, error)

TitleBoxOffice calls the imdb-title-box-office operation.

func (*Client) TitleCompanyCredits

func (c *Client) TitleCompanyCredits(ctx context.Context, params Params) (any, error)

TitleCompanyCredits calls the imdb-title-company-credits operation.

func (*Client) TitleConnections

func (c *Client) TitleConnections(ctx context.Context, params Params) (any, error)

TitleConnections calls the imdb-title-connections operation.

func (*Client) TitleCredits

func (c *Client) TitleCredits(ctx context.Context, params Params) (any, error)

TitleCredits calls the imdb-title-credits operation.

func (*Client) TitleEpisodes

func (c *Client) TitleEpisodes(ctx context.Context, params Params) (any, error)

TitleEpisodes calls the imdb-title-episodes operation.

func (*Client) TitleFilmingLocations

func (c *Client) TitleFilmingLocations(ctx context.Context, params Params) (any, error)

TitleFilmingLocations calls the imdb-title-filming-locations operation.

func (*Client) TitleGoofs

func (c *Client) TitleGoofs(ctx context.Context, params Params) (any, error)

TitleGoofs calls the imdb-title-goofs operation.

func (*Client) TitleImages

func (c *Client) TitleImages(ctx context.Context, params Params) (any, error)

TitleImages calls the imdb-title-images operation.

func (*Client) TitleKeywords

func (c *Client) TitleKeywords(ctx context.Context, params Params) (any, error)

TitleKeywords calls the imdb-title-keywords operation.

func (*Client) TitleParentalGuide

func (c *Client) TitleParentalGuide(ctx context.Context, params Params) (any, error)

TitleParentalGuide calls the imdb-title-parental-guide operation.

func (*Client) TitlePublicFactsAnalysis

func (c *Client) TitlePublicFactsAnalysis(ctx context.Context, params Params) (any, error)

TitlePublicFactsAnalysis calls the imdb-title-public-facts-analysis operation.

func (*Client) TitleQuotes

func (c *Client) TitleQuotes(ctx context.Context, params Params) (any, error)

TitleQuotes calls the imdb-title-quotes operation.

func (*Client) TitleRatings

func (c *Client) TitleRatings(ctx context.Context, params Params) (any, error)

TitleRatings calls the imdb-title-ratings operation.

func (*Client) TitleReleaseInfo

func (c *Client) TitleReleaseInfo(ctx context.Context, params Params) (any, error)

TitleReleaseInfo calls the imdb-title-release-info operation.

func (*Client) TitleReviews

func (c *Client) TitleReviews(ctx context.Context, params Params) (any, error)

TitleReviews calls the imdb-title-reviews operation.

func (*Client) TitleSimilar

func (c *Client) TitleSimilar(ctx context.Context, params Params) (any, error)

TitleSimilar calls the imdb-title-similar operation.

func (*Client) TitleTechnicalSpecs

func (c *Client) TitleTechnicalSpecs(ctx context.Context, params Params) (any, error)

TitleTechnicalSpecs calls the imdb-title-technical-specs operation.

func (*Client) TitleTrivia

func (c *Client) TitleTrivia(ctx context.Context, params Params) (any, error)

TitleTrivia calls the imdb-title-trivia operation.

func (*Client) TitleVideos

func (c *Client) TitleVideos(ctx context.Context, params Params) (any, error)

TitleVideos calls the imdb-title-videos operation.

type Params

type Params map[string]any

Params maps the exact OpenAPI parameter names expected by this platform client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL