Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

giphy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

giphy

A simple wrapper around giphy's api

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
37
increased by164.29%
Maintainers
1
Weekly downloads
 
Created
Source

Node Giphy

Play around with Giphy's api in node

Eagle playing with spinkler

Node Giphy is a simple wrapper around Giphy's api.

Install

$ npm install giphy

Usage

First you will need to use the development api key to test. It is dc6zaTOxFJmzC but do not use this for production.

Information about production keys here

Authentication
var giphy = require( 'giphy' )( 'put key here' );

// or

var Giphy = require( 'giphy' )
  , giphy = new Giphy( 'put key here');
Methods

To see all available methods

console.log( giphy.getMethods() );
Available Methods
  • search
  • gifs ( multiple ids )
  • gif ( single id )
  • trending
  • search
  • translate

all methods pretty much have same api.

giphy[ methodName ]( [options,] callback );

so this url

http://api.giphy.com/v1/gifs?ids=feqkVgjJpYtjy,7rzbxdu0ZEXLy

would translate into

giphy.gifs( { ids : [ 'feqkVgjJpYtjy', '7rzbxdu0ZEXLy' ]}, handleGifs );

options object is optional as well, eg.

giphy.trending( handleTrending );
Callback payloads

giphy uses the convention of error first then data. We also pass back some request information as well in the third argument

function handleTrending( err, trending, res ) {
  // ...
}
giphy.trending( handleTrending );
See all the endpoints and params here

Keywords

FAQs

Package last updated on 30 Aug 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc