
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Kubrick is a Ruby wrapper for the Netflix REST API. It is nowhere near ready for use.
Go to the Netflix API keys website and sign up for an account if you haven't done so yet. Register an application.
Start the OAuth authentication process. Kubrick's OAuth setup is designed to be as simple as possible. Start by initializing the Authenticator
class and passing in your consumer key and secret:
authenticator = Kubrick::Authenticator.new("consumer key", "consumer secret")
Next, get a request token. Note that you must save this temporarily somehow as you will need it after you redirect your user to Netflix's login page.
request_token = authenticator.get_request_token
Pass the output of that method and your callback URL into login_url
to get the URL you should redirect your user to:
redirect_url = authenticator.login_url(request_token, "callback_url")
When your user returns, pass your request token (the one you had to save earlier) into get_access_token
.
access_token = authenticator.get_access_token(request_token)
MAKE SURE TO SAVE THE ACCESS TOKEN. It won't change unless the user revokes access to your application.
You can now make calls by passing in the access token details and your consumer details. Like this:
m = Kubrick::Movie.new(access_token, {:oauth_consumer_key => "consumer_key", :oauth_consumer_secret => "consumer_secret"})
m.find_by_title("2001: A Space Odyssey")
Kubrick is by no means ready for use. It's not even close to complete. If you want to use it, go ahead, but be warned that the API's may change by surprise.
Do whatever the heck you want with this. Fork it, rewrite, sell it as your own. I don't care. But please retain credit to me and any contributors.
© Copyright 2012 J-P Teti.
FAQs
Unknown package
We found that kubrick demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.