diff --git a/api/pages/project/search/titles.ts b/api/pages/project/search/titles.ts index c3cd1bf..a745019 100644 --- a/api/pages/project/search/titles.ts +++ b/api/pages/project/search/titles.ts @@ -15,7 +15,7 @@ import { } from "../../../../error.ts"; /** - * Options for {@linkcode get} + * Options for {@linkcode getLinks} * * @experimental **UNSTABLE**: New API, yet to be vetted. */ @@ -33,7 +33,7 @@ export interface GetLinksOptions * @param options - Additional configuration options * @returns A {@linkcode Request} object for fetching link data */ -export const makeGetRequest = ( +export const makeGetLinksRequest = ( project: string, options?: GetLinksOptions, ): Request => { @@ -59,7 +59,7 @@ export const makeGetRequest = ( * @param options Additional configuration options for the request * @returns A {@linkcode Response} object containing the link data */ -export const get = ( +export const getLinks = ( project: string, options?: GetLinksOptions, ): Promise< @@ -72,7 +72,7 @@ export const get = ( }, R> > => setDefaults(options ?? {}).fetch( - makeGetRequest(project, options), + makeGetLinksRequest(project, options), ) as Promise< ResponseOfEndpoint<{ 200: SearchedTitle[]; @@ -92,13 +92,13 @@ export const get = ( * @returns An async generator that yields each link data * @throws {TypedError<"NotLoggedInError" | "NotMemberError" | "NotFoundError" | "InvalidFollowingIdError"> | HTTPError} */ -export async function* list( +export async function* getLinksStream( project: string, options?: GetLinksOptions, ): AsyncGenerator { let followingId = options?.followingId ?? ""; do { - const response = await get(project, { ...options, followingId }); + const response = await getLinks(project, { ...options, followingId }); switch (response.status) { case 200: break;