npm install gfycat-sdk --save
Obtain a client_id and client_secret for your integration from the Gfycat developers portal.
const Gfycat = ;var gfycat = clientId: YOUR_CLIENT_ID clientSecret: YOUR_CLIENT_SECRET;
For security reasons, we suggest storing the client id and secret in a secure location.
Returns a callback, or promise that resolves to the api authentication token that is valid for 1 hour
Returns a promise that resolves to a gfycats object. API supports pagination using cursors and count/first. The optional random attribute will randomize the result returned by the API - do not supply pagination attributes with this.
let options =search_text: 'hello'count: 20first: 30;gfycat;
Returns user account information by username
let options =userId: 'myUsername';gfycat;
Return Gfycat json by gfycat name
let options =gfyId: 'richpepperyferret';gfycat
Return the gfycats uploaded and shared by a given username.
let options =userId: 'myUsername';gfycat
Return JSON of currently trending gifs
let options =count: 10cursor: ''gfycat
Return JSON of currently trending tags
let options =count: 10populated: falsegfycat