Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philipjscott/tenor-fetch
A library that lets you access the Tenor API!
https://github.com/philipjscott/tenor-fetch
gif tenor
Last synced: about 1 month ago
JSON representation
A library that lets you access the Tenor API!
- Host: GitHub
- URL: https://github.com/philipjscott/tenor-fetch
- Owner: philipjscott
- Created: 2020-09-18T05:12:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-13T17:43:17.000Z (about 2 years ago)
- Last Synced: 2024-09-26T10:48:48.233Z (3 months ago)
- Topics: gif, tenor
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/tenor-fetch
- Size: 119 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tenor-fetch
A library that lets you access the Tenor API. What's Tenor? A GIF search engine.
Rad?
![Tenor in action](https://media1.tenor.com/images/c7504b9fb03c95b3b5687d744687e11c/tenor.gif)
Yeah. Totally rad.
Also, you should totally check out my rad start-up, [Tutturu.tv](https://tutturu.tv) 👏
# Installation
```
npm install --save tenor-fetch
```# Getting started
You'll need an API key from Tenor: https://tenor.com/gifapi
```js
const TenorFetch = require('tenor-fetch');const tf = new TenorFetch('YOUR-TENOR-API-KEY');
// Search "smug anime" on Tenor
tf.search('smug anime').then(console.log);// Find trending GIFs on Tenor
tf.trending().then(console.log);
```# API
Check out the endpoints here: https://tenor.com/gifapi/documentation#endpoints
This project is written in TypeScript so you can let IntelliSense guide you.
The library is pretty straightforward: if you're lost just glance at the [source](https://github.com/ScottyFillups/tenor-fetch/blob/master/src/index.ts).
# Tests
```
npm run test
```# Contributing
Before you make a merge request, please:
1. Run `npm run lint` and `npm run format`
2. Ensure all existing tests pass
3. Add tests for your additions (if applicable)Thanks! 💖
# Acknowledgements
Inspired from [@giphy/js-fetch-api](https://www.npmjs.com/package/@giphy/js-fetch-api).
I try my best to match the API. We have promises, but I can't promise you anything (haha).
Regarding the source code, I'm a total noob and I just followed the instructions [here](https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c). Sorry.