Gfycat is shutting down on September 1, 2023.
Unofficial Node JavaScript API wrapper written in TypeScript for Gfycat.com API. Why an unofficial SDK? The official Gfycat JavaScript client is incomplete and lacks TypeScript support.
This package requires Node version 14 or higher.
Install with npm
npm i gfycat
or yarn
yarn add gfycat
See examples in the examples
directory.
You will need a Gfycat API client id and client secret. Follow the steps in the Gfycat API documentation to obtain a client id and client secret.
You can enable logging by setting the DEBUG
environment variable to gfycat
, i.e. DEBUG=gfycat
or DEBUG=*
.
This is a work-in-progress SDK. Not all APIs are implemented. The list of documented Gfycat API endpoints can be found in the Gfycat API documentation.
- Client Credentials Grant (currently, the GfycatClient only uses password grant authentication)
- Password Grant Authentication
- Refreshing access token
- Checking if username is available / exists / is valid
- Checking if your user's email is verified or not
- Send verification email
- Send a password reset email
- Getting a user's public details
- Getting authenticated user's details
- Updating a user's details
- Uploading user's profile image
- Creating a new user account
- Following another user
- Unfollowing a user
- Checking if you follow a user
- List all users you follow
- List all users following you
- Get all of your likes
- Listing the the feed of published gfycats for a user
- Listing the the private feed of all gfycats for a user
- Listing the timeline feed of all users you follow
The collections APIs are undocumented.
- Create a collection
- Add to a collection
- Remove from a collection
- Delete a collection
- Get a user's collections
- Get gfycats in a collection
- Getting info for a single gfycat
- Get number of likes
- Get your Gfycats
- Get a user's Gfycats
- Creating Gfycats
- Updating Gfycats
- Update gfycat title
- Delete gfycat title
- Update gfycat description
- Delete gfycat description
- Get my gfycat like status
- Like my gfycat
- Update/replace gfycat tags
- Get gfycat domain whitelist
- Update/replace gfycat domain whitelist
- Get gfycat geo whitelist
- Update/replace geo whitelist
- Delete gfycat whitelist
- Update gfycat visibility
- Update/replace gfycat nsfw flag
- Delete a gfycat
This project uses commitizen and semantic-release. When committing, please use npm run commit
to let commitizen create your commit.