Code Monkey home page Code Monkey logo

gfycat's Introduction

โš ๏ธ This package is deprecated.

Gfycat is shutting down on September 1, 2023.

gfycat

npm GitHub Commitizen friendly CircleCI

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.

Table of Contents

Install

This package requires Node version 14 or higher.

Install with npm

npm i gfycat

or yarn

yarn add gfycat

Usage

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=*.

Features

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.

Authentication

Users

User Feeds

Collections

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

Gfycat

Trending Feeds

Search

Contributing

This project uses commitizen and semantic-release. When committing, please use npm run commit to let commitizen create your commit.

gfycat's People

Contributors

matthamil avatar

Stargazers

 avatar  avatar

Watchers

 avatar

gfycat's Issues

Remove DEBUG package and allow consumers to provide their own logger

Allow GfycatClient to accept an optional log method similar to:

type Log = (response: { statusCode: number, body?: any }) => void | Promise<void>;

and add a static method log to the GfycatClient that allows consumers to enable the default logger

const client = new GfycatClient({
   ...opts,
   log: GfycatClient.log,
})

Remove query-string dependency

There aren't many query strings used in the Gfycat REST APIs. We can roll our own function to append and stringify query strings. This will allow us to remove the query-string dependency.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.