@@ -15,7 +15,7 @@ import {
15
15
} from "../../../../error.ts" ;
16
16
17
17
/**
18
- * Options for {@linkcode get }
18
+ * Options for {@linkcode getLinks }
19
19
*
20
20
* @experimental **UNSTABLE**: New API, yet to be vetted.
21
21
*/
@@ -33,7 +33,7 @@ export interface GetLinksOptions<R extends Response | undefined>
33
33
* @param options - Additional configuration options
34
34
* @returns A {@linkcode Request} object for fetching link data
35
35
*/
36
- export const makeGetRequest = < R extends Response | undefined > (
36
+ export const makeGetLinksRequest = < R extends Response | undefined > (
37
37
project : string ,
38
38
options ?: GetLinksOptions < R > ,
39
39
) : Request => {
@@ -59,7 +59,7 @@ export const makeGetRequest = <R extends Response | undefined>(
59
59
* @param options Additional configuration options for the request
60
60
* @returns A {@linkcode Response} object containing the link data
61
61
*/
62
- export const get = < R extends Response | undefined = Response > (
62
+ export const getLinks = < R extends Response | undefined = Response > (
63
63
project : string ,
64
64
options ?: GetLinksOptions < R > ,
65
65
) : Promise <
@@ -72,7 +72,7 @@ export const get = <R extends Response | undefined = Response>(
72
72
} , R >
73
73
> =>
74
74
setDefaults ( options ?? { } ) . fetch (
75
- makeGetRequest ( project , options ) ,
75
+ makeGetLinksRequest ( project , options ) ,
76
76
) as Promise <
77
77
ResponseOfEndpoint < {
78
78
200 : SearchedTitle [ ] ;
@@ -92,13 +92,13 @@ export const get = <R extends Response | undefined = Response>(
92
92
* @returns An async generator that yields each link data
93
93
* @throws {TypedError<"NotLoggedInError" | "NotMemberError" | "NotFoundError" | "InvalidFollowingIdError"> | HTTPError }
94
94
*/
95
- export async function * list (
95
+ export async function * getLinksStream (
96
96
project : string ,
97
97
options ?: GetLinksOptions < Response > ,
98
98
) : AsyncGenerator < SearchedTitle , void , unknown > {
99
99
let followingId = options ?. followingId ?? "" ;
100
100
do {
101
- const response = await get ( project , { ...options , followingId } ) ;
101
+ const response = await getLinks ( project , { ...options , followingId } ) ;
102
102
switch ( response . status ) {
103
103
case 200 :
104
104
break ;
0 commit comments