Loadgif
GIFs make fun! Use Giphy API from your Ruby programs and command line. Check out Giphy Labs for inspiration.

Installation
Add this line to your application's Gemfile:
gem 'loadgif'
And then execute:
$ bundle
Or install it yourself as:
$ gem install loadgif
Usage
Set the API version and api_key:
Loadgif::Configuration.configure do |config|
config.version = THE_API_VERSION
config.api_key = YOUR_API_KEY
end
Important: Giphy API is currently in public beta. Unless version and api_key are set
to specific values the default values for the beta period will be used. Check
Giphy's API for updates.
That's it, you're ready to have fun!
Trending
Loadgif.trending(limit: 5)
Translate
Loadgif.translate('geek')
Search
Loadgif.search('funny cat', {limit: 50, offset: 25})
Favorites
Write
Loadgif.favorite('12HoHdqnDxz5NS')
Read
Loadgif.favorites('absurdnoise', {limit: 50, offset: 25})
Screensaver
Loadgif.screensaver('surprise')
Random
Loadgif.random
For getting random gifs with a specific tag:
Loadgif.random('american psycho')
GIFs by ID
Loadgif.gif_by_id('13p77tfexyLtx6', 'l2Sqb0owUC5s5tz5m', 'xT9DPoKxz6nrODpwVa')
Command Line Tool
There is a small command line tool that let's you search for GIFs from the command line and opens it on your browser. Just for fun.
$ loadgif 'dance'
Development
After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. 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.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/cis-neelam/loadgif.git. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.
Code of Conduct
Everyone interacting in the Loadgif project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.