https://github.com/goronfreeman/pipe_dream
A dreamy, zero-dependency YouTube API wrapper
https://github.com/goronfreeman/pipe_dream
ruby youtube
Last synced: about 1 month ago
JSON representation
A dreamy, zero-dependency YouTube API wrapper
- Host: GitHub
- URL: https://github.com/goronfreeman/pipe_dream
- Owner: goronfreeman
- Created: 2018-07-02T04:06:11.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T02:34:43.000Z (almost 8 years ago)
- Last Synced: 2025-02-06T20:38:29.908Z (over 1 year ago)
- Topics: ruby, youtube
- Language: Ruby
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PipeDream
PipeDream allows you to easily search YouTube by providing a simple wrapper
around YouTube's official APIs. What sets PipeDream apart from other options, is
that it has no dependencies outside the Ruby standard library. This makes it easy
to include in projects where you can't easily bundle dependencies, such as in an
Alfred workflow.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'pipe_dream'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install pipe_dream
## Usage
Before you begin using PipeDream to perform searches, you will have to configure
it with your developer API key. You can create a new API key using the
[Google Cloud Console](https://console.cloud.google.com/). Once you have created your key, configure PipeDream with
it like this:
```ruby
PipeDream.configure do |config|
config.api_key = ''
end
```
Now you can begin searching! Here is a basic example of how you can perform a search:
```ruby
req = PipeDream::Request.new('redlettermedia')
res = PipeDream::Response.new(req.get)
# The items method will return an array of objects that wrap the search results.
items = res.items #=> [# 'RedLetterMedia'
channel.description #=> 'Red Letter Media is responsible for the 70 minute Phantom Menace review as well as Space Cop, Half in the Bag, and Best of the Worst. Full time frauds.'
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[goronfreeman]/pipe_dream.