brianmichel / badfruit Goto Github PK
View Code? Open in Web Editor NEWRuby Gem for Rotten Tomatoes
License: MIT License
Ruby Gem for Rotten Tomatoes
License: MIT License
One more suggestion: It would be great if BadFruit threw a proper error when one of the rate limits is hit. As it is now, once you make more than 10,000 requests to the API per day BadFruit just throws a TypeError because the JSON parser can't deal with the near-empty response body:
{
"error": "Account Over Rate Limit"
}
It would be great if BadFruit detected this event, either by checking for a 403 Error or by actually looking at the response header, which looks like this, when the above TypeError occurs:
{
"accept-ranges": "bytes",
"content-type": "application/json",
"date": "Fri, 16 Mar 2012 14:16:54 GMT",
"retry-after": "35984",
"server": "Mashery Proxy",
"x-mashery-error-code": "ERR_403_DEVELOPER_OVER_RATE",
"x-mashery-responder": "proxylb-p-us-east-1d-07.mashery.com",
"content-length": "35",
"connection": "Close"
}
After using BadFruit for a bit, it seems that every call to BadFruit::Movie.info triggers an entirely new request to the API. Needless to say, this causes an enormous amount of unnecessary traffic. It seems to me that if you stored the raw JSON output in the object, then this could be entirely avoided.
For a project of mine I need the genres and the IMDB ID associated with movies. The API returns both, but bf.movies.search_by_name("Hackers")[0].genres just returns nil and bf.movies.search_by_name("Hackers")[0].alternate_ids throws a NoMethodError.
There is currently no documentation for this gem. I'd love for there to be an RDOC or something that people could read through to get more info.
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.