Skip to content

@lastshotlabs/slingshot-gifs

npm install @lastshotlabs/slingshot-gifs

Create the slingshot-gifs plugin for proxied GIF search.

Validates config with Zod, freezes it at the boundary, and resolves the appropriate provider (Giphy or Tenor) in the closure. Routes are mounted during setupRoutes.

The server-side API key is never exposed in HTTP responses — all provider calls happen server-side and only normalized GifResult arrays are returned to clients.

function createGifsPlugin(rawConfig: unknown): SlingshotPlugin

Source: packages/slingshot-gifs/src/plugin.ts

Shape of a single item in the Giphy API data array.

function createGiphyProvider(config: { apiKey: string; rating?: string; limit?: number; fetchTimeoutMs?: number; }): GifProvider

Source: packages/slingshot-gifs/src/providers/giphy.ts

Shape of a single item in the Tenor API v2 results array.

function createTenorProvider(config: { apiKey: string; rating?: string; limit?: number; fetchTimeoutMs?: number; }): GifProvider

Source: packages/slingshot-gifs/src/providers/tenor.ts

A single GIF result returned by a provider.

Fields are normalized across providers so consumers never need to know which backend (Giphy, Tenor) produced the result.

Source: packages/slingshot-gifs/src/types.ts

A single GIF result returned by a provider.

Fields are normalized across providers so consumers never need to know which backend (Giphy, Tenor) produced the result.

Source: packages/slingshot-gifs/src/types.ts

A single GIF result returned by a provider.

Fields are normalized across providers so consumers never need to know which backend (Giphy, Tenor) produced the result.

Source: packages/slingshot-gifs/src/types.ts

A single GIF result returned by a provider.

Fields are normalized across providers so consumers never need to know which backend (Giphy, Tenor) produced the result.

Source: packages/slingshot-gifs/src/types.ts

A single GIF result returned by a provider.

Fields are normalized across providers so consumers never need to know which backend (Giphy, Tenor) produced the result.

Source: packages/slingshot-gifs/src/types.ts