
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
A ruby library interface to the YouTube Data API. Parses channel, playlist, and video data.
gem install youtube_data_api
If using bundler:
add gem 'youtube_data_api', '~> 3.0'
to the Gemfile,
then run bundle install
.
channel_url = "https://www.youtube.com/user/CSPAN"
YoutubeDataApi.channel(channel_url)
channel_url = "https://www.youtube.com/user/CSPAN"
YoutubeDataApi.channel_playlists(channel_url)
playlist_url = "https://www.youtube.com/playlist?list=PLf0o4wbW8SXqTSo6iJkolKCKJYBnpo9NZ"
YoutubeDataApi.playlist(playlist_url)
playlist_url = "https://www.youtube.com/playlist?list=PLf0o4wbW8SXqTSo6iJkolKCKJYBnpo9NZ"
YoutubeDataApi.playlist_items(playlist_url)
video_url = "https://www.youtube.com/watch?v=oBM7DIeMsP0"
YoutubeDataApi.video(video_url)
You may need to paginate through responses.
channel_url = "https://www.youtube.com/user/CSPAN"
response = YoutubeDataApi.channel_playlists(channel_url)
while response do
puts response["pageInfo"]
if response["nextPageToken"]
request_params = {:page_token => response["nextPageToken"]}
response = YoutubeDataApi.channel_playlists(channel_url, request_params)
else
response = nil
end
end
Create a new application in the google developer console, and note its name. Navigate to the APIs & Auth > APIs menu and enable the YouTube Data API v3 by searching for it. Refer to the YouTube API Application Registration Guide for more support.
Navigate to the APIs & Auth > Credentials menu and add credentials for an API Key, specifically, a Server Key. Note the value of your API Key. Refer to the YouTube API Key Generation Guide for more support.
Make requests on behalf of your YouTube API-enabled Application by using an environment variable approach or a request parameter approach to specifying your API Key.
If using the environment variable configuration approach,
add a variable called YOUTUBE_DATA_API_KEY
to your .bash_profile:
export YOUTUBE_DATA_API_KEY="my-key-123"
If using the request parameter configuration approach, pass the :api_key
parameter to any request:
channel_url = "https://www.youtube.com/user/CSPAN"
options = {:api_key => "my-key-123"}
YoutubeDataApi.channel(channel_url, options)
Browse existing issues or create a new issue to communicate bugs, desired features, etc. After forking the repo and pushing your changes, create a pull request referencing the applicable issue(s).
After checking out the repo, run bin/setup
to install dependencies.
Run rake rspec
or bundle exec rspec spec/
to run the tests.
Optionally run bin/console
for an interactive prompt that will allow you to experiment.
NOTE: tests expect you to specify your YouTube API Key using the environment variable configuration approach.
To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
When bumping the gem version, please keep the major version number in sync with the YouTube API version (currently v3).
FAQs
Unknown package
We found that youtube_data_api 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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.