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.
- [x] Client Credentials Grant (currently, the GfycatClient only uses password grant authentication)
- [x] Password Grant Authentication
- [x] Refreshing access token
- [x] Checking if username is available / exists / is valid
- [x] Checking if your user's email is verified or not
- [x] Send verification email
- [x] Send a password reset email
- [x] Getting a user's public details
- [x] Getting authenticated user's details
- [x] Updating a user's details
- [x] Uploading user's profile image
- [ ] Creating a new user account
- [x] Following another user
- [x] Unfollowing a user
- [x] Checking if you follow a user
- [x] List all users you follow
- [x] List all users following you
- [x] Get all of your likes
- [x] Listing the the feed of published gfycats for a user
- [x] Listing the the private feed of all gfycats for a user
- [x] Listing the timeline feed of all users you follow
The collections APIs are undocumented.
- [x] Create a collection
- [x] Add to a collection
- [x] Remove from a collection
- [x] Delete a collection
- [x] Get a user's collections
- [x] Get gfycats in a collection
- [x] Getting info for a single gfycat
- [x] Get number of likes
- [x] Get your Gfycats
- [x] Get a user's Gfycats
- [x] Creating Gfycats
- [ ] Updating Gfycats
- [x] Update gfycat title
- [x] Delete gfycat title
- [x] Update gfycat description
- [x] Delete gfycat description
- [x] Get my gfycat like status
- [x] Like my gfycat
- [x] Update/replace gfycat tags
- [ ] Get gfycat domain whitelist
- [x] Update/replace gfycat domain whitelist
- [ ] Get gfycat geo whitelist
- [x] Update/replace geo whitelist
- [x] Delete gfycat whitelist
- [x] Update gfycat visibility
- [x] Update/replace gfycat nsfw flag
- [x] Delete a gfycat
- [x] Search Gfycats
- [x] User account search
This project uses commitizen and semantic-release. When committing, please use npm run commit
to let commitizen create your commit.