@lastshotlabs/slingshot-gifs
npm install @lastshotlabs/slingshot-gifs
Functions
Section titled “Functions”createGifsPlugin
Section titled “createGifsPlugin”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): SlingshotPluginSource: packages/slingshot-gifs/src/plugin.ts
createGiphyProvider
Section titled “createGiphyProvider”Shape of a single item in the Giphy API data array.
function createGiphyProvider(config: { apiKey: string; rating?: string; limit?: number; fetchTimeoutMs?: number; }): GifProviderSource: packages/slingshot-gifs/src/providers/giphy.ts
createTenorProvider
Section titled “createTenorProvider”Shape of a single item in the Tenor API v2 results array.
function createTenorProvider(config: { apiKey: string; rating?: string; limit?: number; fetchTimeoutMs?: number; }): GifProviderSource: packages/slingshot-gifs/src/providers/tenor.ts
Constants
Section titled “Constants”gifsPluginConfigSchema
Section titled “gifsPluginConfigSchema”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
Interfaces
Section titled “Interfaces”GifProvider
Section titled “GifProvider”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
GifResult
Section titled “GifResult”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
GifSearchOptions
Section titled “GifSearchOptions”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
GifsPluginConfig
Section titled “GifsPluginConfig”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