Giter Club home page Giter Club logo

go-tmdb's People

Contributors

abates avatar captainrandom avatar cedricziel avatar chkinglee avatar cyruzin avatar edwsel avatar funzinator avatar gregadams4 avatar idealhack avatar jvicu2001 avatar knutzuidema avatar lieranderl avatar pdf avatar ppp225 avatar ruslanfedoseenko avatar ryanbradynd05 avatar seanbrant avatar themihai avatar zendamacf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

go-tmdb's Issues

[BUG] Movie and TV Certifications Mixup

The API calls for the movie and tv certifications seem to get mixed up occasionally. Some times, they will return the correct certifications (G,PG,R, etc for movies and TV-Y, TV-MA, etc for TV). Other times, the movie API will return TV certifications and vice versa.

TMDB API Support Forum

Who is using go-tmdb

I was wondering:
Is anyone using go-tmdb for open source projects?
If yes what are you building?

i just dont want to build something that somealready build.
greetings

aggregate_credits api

Could please add aggregate_credits api?

fmt.Sprintf("%s/tv/%v/season/%v/aggregate_credits?api_key=%s", baseURL, showID, seasonNum, tmdb.apiKey)

Thanks

Remove or adapt rate limiting

According to TMDB API docs, rate limiting was disabled on December 16, 2019.

TMDB founder stated the following in the forums regarding api.themoviedb.org:

"One of our CDN providers enforces some base level rate limiting to help prevent DDOS attacks. I believe it's a maximum of 50 requests per second and 20 connections per IP."

as well as this for image.tmdb.org:

" For image.tmdb.org, the only thing we limit is the max number of simultaneous connections. The limit is the same, 20."

go-tmdb library still rate limits client requests to about 4 per second, although that's not necessary anymore. maxRequestPerSecond should be probably changed to 20.

Did something break?

Hello,

I use go-tmdb since forever but did a later version break things?

I always used to do something like:

package main

import "github.com/ryanbradynd05/go-tmdb"

var tmdbApi *tmdb.TMDb

func main() {
	tmdbApi = tmdb.Init("aaaabbbbcccc")
}

But this is now throwing error: "cannot use "aaaabbbbcccc" (type string) as type tmdb.Config in argument to tmdb.Init"

And the README.md example doesn't make it very clear because whatever I try, I cannot seem to get things initialized with my key.
Is this a bug perhaps? If not, perhaps an example that is more clear would help.
Thanks!

Missing overview in finding

Please add "Overview string" in structs MovieShort and TvShort
Like that:

type MovieShort struct {
Adult bool
BackdropPath string json:"backdrop_path"
ID int
OriginalTitle string json:"original_title"
Popularity float32
PosterPath string json:"poster_path"
ReleaseDate string json:"release_date"
Title string
Overview string
Video bool
VoteAverage float32 json:"vote_average"
VoteCount uint32 json:"vote_count"
}

type TvShort struct {
Adult bool
BackdropPath string json:"backdrop_path"
ID int
OriginalName string json:"original_name"
OriginCountry []string json:"origin_country"
Popularity float32
PosterPath string json:"poster_path"
FirstAirDate string json:"first_air_date"
Name string
Overview string
Video bool
VoteAverage float32 json:"vote_average"
VoteCount uint32 json:"vote_count"
}

Ratelimit on 1fe48e1420500b624f33b38ab6f6d8b4b0ac2053 not working

Unfortunately because of a broken implementation on tmdb servers the ratelimiting fix on 1fe48e1 is not working.

Here's a test that should be able to show you that it's not working (might have to rerun it or increase the timeout timer)

Don't forget to add your key in the Init function

package tmdb

import (
        "fmt"
        "testing"
        "time"
)

func TestRateLimit(t *testing.T) {
        tmdb := Init("YOUR_KEY") // add your key here
        timer := time.NewTimer(time.Second * 10)
        for {
                select {
                case <-timer.C:
                        fmt.Println("Couldn't break the ratelimit in 10 seconds")
                        return
                default:
                }
                _, err := tmdb.GetFind("tt0137523", "imdb_id", nil)
                if err != nil {
                        t.Fatal(err)
                }
        }
}

Proxies are ignored?

Soo I am trying to use the package with proxies configured and I have an error
Get "URL HERE": dial tcp 127.0.0.1:443: connect: connection refused
My config:

     config := tmdb.Config{
		APIKey: key,
		Proxies: []tmdb.Proxy{
			{Host: "127.0.0.1", Port: "1087"},
			{Host: "20.111.54.16", Port: "80"},
		},
		UseProxy: true,
	}

Also, during my tries I checked the sources and it seems like proxies are applied only when the slice has length > 1 that means there supposed to be at least two proxies?
Seems the source is just an override so it supposed to work even with single proxy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.