Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
links.ts3.16 kB
/** * Generated by orval v7.2.0 🍺 * Do not edit manually. * storyden * Storyden social API for building community driven platforms. The Storyden API does not adhere to semantic versioning but instead applies a rolling strategy with deprecations and minimal breaking changes. This has been done mainly for a simpler development process and it may be changed to a more fixed versioning strategy in the future. Ultimately, the primary way Storyden tracks versions is dates, there are no set release tags currently. * OpenAPI spec version: v1.25.8-canary */ import type { LinkCreateBody, LinkCreateOKResponse, LinkGetOKResponse, LinkListOKResponse, LinkListParams, } from "../openapi-schema"; import { fetcher } from "../server"; /** * Add a link to the community bookmarks. This will also scrape the content at the site the link points to, if possible. If the submitted link is an invalid link for whatever reason (invalid URL structure or page is dead) then the API will fail. The metadata for the link is indexed on success. If the submitted link already exists it will be an idempotent operation, unless the body contains additional metadata. In these cases, the link's metadata will be updated with the new metadata and the URL is unchanged. When a link is submitted, it is first "cleaned" to remove any fragments. */ export type linkCreateResponse = { data: LinkCreateOKResponse; status: number; }; export const getLinkCreateUrl = () => { return `/links`; }; export const linkCreate = async ( linkCreateBody: LinkCreateBody, options?: RequestInit, ): Promise<linkCreateResponse> => { return fetcher<Promise<linkCreateResponse>>(getLinkCreateUrl(), { ...options, method: "POST", headers: { "Content-Type": "application/json", ...options?.headers }, body: JSON.stringify(linkCreateBody), }); }; /** * List all links using the filtering options. */ export type linkListResponse = { data: LinkListOKResponse; status: number; }; export const getLinkListUrl = (params?: LinkListParams) => { const normalizedParams = new URLSearchParams(); Object.entries(params || {}).forEach(([key, value]) => { if (value !== undefined) { normalizedParams.append(key, value === null ? "null" : value.toString()); } }); return normalizedParams.size ? `/links?${normalizedParams.toString()}` : `/links`; }; export const linkList = async ( params?: LinkListParams, options?: RequestInit, ): Promise<linkListResponse> => { return fetcher<Promise<linkListResponse>>(getLinkListUrl(params), { ...options, method: "GET", }); }; /** * Get the details for a specific link. Such as where it's been posted, which resources it's linked to and how many times it's been opened. */ export type linkGetResponse = { data: LinkGetOKResponse; status: number; }; export const getLinkGetUrl = (linkSlug: string) => { return `/links/${linkSlug}`; }; export const linkGet = async ( linkSlug: string, options?: RequestInit, ): Promise<linkGetResponse> => { return fetcher<Promise<linkGetResponse>>(getLinkGetUrl(linkSlug), { ...options, method: "GET", }); };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server