Skip to content

rawrmaan/restyped-giphy-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTyped typings for the Giphy API

Quickly and easily use the wonderful Giphy API in TypeScript with type checking for URL endpoints and query params!

How to use it

npm install restyped-giphy-api

Then use a REST client that supports RESTyped, like restyped-axios.

Example

import axios from 'restyped-axios'
import { GiphyAPI } from 'restyped-giphy-api'

const client = axios.create<GiphyAPI>({baseURL: 'http://api.giphy.com/v1'})

client.request({
  url: '/gifs/search',
  params: {
    api_key: 'abc123',
    q: 'zero effort'
  }
}).then((res) => {
  return res.data.data[0].images.fixed_height.url
})

About

RESTyped typings for Giphy's REST API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published