@@ -118,6 +118,41 @@ class ResourcesHelper {
118
118
return await this . #wrapper. http ( ) . listUntil ( "/resources/collaborated" , shouldContinue , sort ) ;
119
119
}
120
120
121
+ /** List a page of resources by an author.
122
+ *
123
+ * @param {number } authorId The identifier of the resource author.
124
+ * @param {SortOptions } sort An optional set of sort options.
125
+ *
126
+ * @return {Array<BasicResource> } An array of raw data objects.
127
+ */
128
+ async listByAuthor ( authorId , sort ) {
129
+ return await this . #wrapper. get ( `/resources/authors/${ authorId } ` , sort ) ;
130
+ }
131
+
132
+ /** List all pages of resources by an author.
133
+ *
134
+ * @param {number } authorId The identifier of the resource author.
135
+ * @param {SortOptions } sort An optional set of sort options.
136
+ *
137
+ * @return {Array<BasicResource> } An array of raw data objects.
138
+ */
139
+ async listByAuthorAll ( authorId , sort ) {
140
+ return await this . #wrapper. http ( ) . listUntil ( `/resources/authors/${ authorId } ` , ( ) => true , sort ) ;
141
+ }
142
+
143
+ /** List multiple pages of resources by an author until a condition is no longer met.
144
+ *
145
+ * @param {number } authorId The identifier of the resource author.
146
+ * @param {function(BasicResource):boolean } shouldContinue A function which determines if further pages are
147
+ * requested.
148
+ * @param {SortOptions } sort An optional set of sort options.
149
+ *
150
+ * @return {Array<BasicResource> } An array of raw data objects.
151
+ */
152
+ async listByAuthorUntil ( authorId , shouldContinue , sort ) {
153
+ return await this . #wrapper. http ( ) . listUntil ( `/resources/authors/${ authorId } ` , shouldContinue , sort ) ;
154
+ }
155
+
121
156
/** Fetch detailed information about a resource.
122
157
*
123
158
* @param {number } resourceId The identifier of the resource.
0 commit comments