ryanbradynd05 / go-tmdb Goto Github PK
View Code? Open in Web Editor NEWGolang Wrapper for TheMovieDB API
License: MIT License
Golang Wrapper for TheMovieDB API
License: MIT License
The External IDs for Episodes and Seasons can be retrieved but the External Ids for the TV Show itself seems to be missing.
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.
The value field can be many different values in this response. It can be a string, int, bool or struct in each particular case. Come up with some way to define this.
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
http://docs.themoviedb.apiary.io/#reference/movies/movieidreleasedates
This endpoint includes a new release date ''type" value.
Hello,
Not sure if this project is still alive but recommendations are missing. From what I undrstand, they pretty much replaced the 'similar' function.
https://developers.themoviedb.org/3/tv/get-tv-recommendations
Could please add aggregate_credits api?
fmt.Sprintf("%s/tv/%v/season/%v/aggregate_credits?api_key=%s", baseURL, showID, seasonNum, tmdb.apiKey)
Thanks
the error value of http.Get isn't checked before using it at least in https://github.com/ryanbradynd05/go-tmdb/blob/master/main.go#L53, this causes a segfault when the request fails and it tries to access the headers. This is in case the connection totally fails, as otherwise if there is an 404 there are some http headers available.
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.
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!
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"
}
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)
}
}
}
All links to TMDB's docs point to https://themoviedb.docs.apiary.io/# or some subpage of it; but their documentation has moved to https://developers.themoviedb.org/3/
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.