![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This gem takes a Youtube URL or ID and optional data attributes and returns a hash of metadata about the video.
Add this line to your application's Gemfile:
gem 'yt_meta'
And then execute:
$ bundle
Or install it yourself as:
$ gem install yt_meta
Google requires an API key to use the Youtube API. Follow these instructions to create an app: Generate Key. Use the server key Google generates for you as your API key. Then create an initializer with your API key and an optional default parts array so you don't have to specify the parts you want every time.
YtMeta.configure do |config|
config.api_key = "API_KEY"
config.parts = %w[snippet player] #optional
end
To retrieve all public data about a video (or your default parts),
require "yt_meta"
and then call YtMeta.fetch_data(youtube_id: "some_id")
.
If you wish to fetch only specific parts, call
YtMeta.fetch_data(youtube_id: "some_id", parts: ["snippet", "player"])
,
replacing the parts in the array with the ones you want.
You can find a full list of available parts here:
API Docs.
Be aware that fileDetails
, processingDetails
, and suggestions
require
client OAuth2 login and won't work with this gem.
Fork!
Create your feature branch (git checkout -b my-new-feature
)
Add a configuration file with your API key at spec/support/api_config.rb
.
It's .gitignore
d, so your credentials won't be saved to the repo.
YtMeta.configure do |config|
config.api_key = "TEST_API_KEY"
end
Make your changes!
Make sure all tests pass! If you get SSL certificate verification errors when running the specs, try these fixes
Commit your changes (git commit -am 'Add some feature'
)
Push to the branch (git push origin my-new-feature
)
Create new Pull Request
FAQs
Unknown package
We found that yt_meta 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.