Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 1.1 KB

README.MD

File metadata and controls

68 lines (50 loc) · 1.1 KB

GiphyRB

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'giphyrb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install giphyrb

Usage

Create a Giphy object with

giphy = GiphyRB::Giphy.new api_key: 'YOUR_API_KEY'

Now, you can use it to get some gifs

Trending

giphy.trending(limit=5, offset=0, rating='g')
=> GiphyRB::Responses::Trending

Translate

giphy.translate(string)
=> GiphyRB::Responses::Translate

Search

giphy.search(query, limit=5, offset=0, rating='g', lang=nil)
=> GiphyRB::Responses::Search

Random

giphy.random(tag=nil, rating='g')
=> GiphyRB::Responses::Random

GIF by ID

giphy.from_id(id)
=> GiphyRB::Response

GIFs by IDs

giphy.from_ids(ids=[])
=> GiphyRB::Response

License

See LICENSE for details.

TODO list

  • Add Stickers packs
  • Improve user experience (new syntax)