Giphy Core Client for Ruby

September 27, 2017 ยท View on GitHub

The Giphy Core SDK is a wrapper around Giphy API.

Build Status

Giphy is the best way to search, share, and discover GIFs on the Internet. Similar to the way other search engines work, the majority of our content comes from indexing based on the best and most popular GIFs and search terms across the web. We organize all those GIFs so you can find the good content easier and share it out through your social channels. We also feature some of our favorite GIF artists and work with brands to create and promote their original GIF content.

Getting Started

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.9.3
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

gem install GiphyClient

Getting Started

Please follow the installation procedure and then run the following code:

# load the gem
require 'GiphyClient'

api_instance = GiphyClient::DefaultApi.new

api_key = "dc6zaTOxFJmzC" # String | Giphy API Key.

q = "cheeseburgers" # String | Search query term or prhase.

opts = { 
  limit: 25, # Integer | The maximum number of records to return.
  offset: 0, # Integer | An optional results offset. Defaults to 0.
  rating: "g", # String | Filters results by specified rating.
  lang: "en", # String | Specify default country for regional content; use a 2-letter ISO 639-1 country code. See list of supported languages <a href = \"../language-support\">here</a>.
  fmt: "json" # String | Used to indicate the expected response format. Default is Json.
}

begin
  #Search Endpoint
  result = api_instance.gifs_search_get(api_key, q, opts)
  p result
rescue GiphyClient::ApiError => e
  puts "Exception when calling DefaultApi->gifs_search_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to http://api.giphy.com/v1

ClassMethodHTTP requestDescription
GiphyClient::DefaultApigifs_categories_category_getGET /gifs/categories/{category}Category Tags Endpoint.
GiphyClient::DefaultApigifs_categories_category_tag_getGET /gifs/categories/{category}/{tag}Tagged Gifs Endpoint.
GiphyClient::DefaultApigifs_categories_getGET /gifs/categoriesCategories Endpoint.
GiphyClient::DefaultApigifs_getGET /gifsGet GIFs by ID Endpoint
GiphyClient::DefaultApigifs_gif_id_getGET /gifs/{gif_id}Get GIF by ID Endpoint
GiphyClient::DefaultApigifs_random_getGET /gifs/randomRandom Endpoint
GiphyClient::DefaultApigifs_search_getGET /gifs/searchSearch Endpoint
GiphyClient::DefaultApigifs_translate_getGET /gifs/translateTranslate Endpoint
GiphyClient::DefaultApigifs_trending_getGET /gifs/trendingTrending GIFs Endpoint
GiphyClient::DefaultApistickers_random_getGET /stickers/randomRandom Sticker Endpoint
GiphyClient::DefaultApistickers_search_getGET /stickers/searchSticker Search Endpoint
GiphyClient::DefaultApistickers_translate_getGET /stickers/translateSticker Translate Endpoint
GiphyClient::DefaultApistickers_trending_getGET /stickers/trendingTrending Stickers Endpoint

Documentation for Models