Skip to content

Commit

Permalink
Stop referencing returnPromises in @return doc (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal authored Aug 18, 2023
1 parent 68deae9 commit bf870c8
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions lib/tumblr.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class TumblrClient {
* @param {Record<string,any>|TumblrClientCallback} [paramsOrCallback] - query parameters
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
getRequest(apiPath, paramsOrCallback, callback) {
let params = paramsOrCallback;
Expand Down Expand Up @@ -489,7 +489,7 @@ class TumblrClient {
* @param {import('./types').NpfReblogParams | import('./types').NpfPostParams } params
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
createPost(blogIdentifier, params, callback) {
const data = this.#transformNpfParams(params);
Expand All @@ -506,7 +506,7 @@ class TumblrClient {
* @param {import('./types').NpfReblogParams | import('./types').NpfPostParams } params
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
editPost(blogIdentifier, postId, params, callback) {
const data = this.#transformNpfParams(params);
Expand Down Expand Up @@ -536,7 +536,7 @@ class TumblrClient {
* @param {Record<string,any>} params
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
createLegacyPost(blogIdentifier, params, callback) {
return this.postRequest(`/v2/blog/${blogIdentifier}/post`, params, callback);
Expand All @@ -551,7 +551,7 @@ class TumblrClient {
* @param {Record<string,any>} params
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
editLegacyPost(blogIdentifier, params, callback) {
return this.postRequest(`/v2/blog/${blogIdentifier}/post/edit`, params, callback);
Expand All @@ -564,7 +564,7 @@ class TumblrClient {
* @param {string} reblogKey - Reblog key of post to like
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
likePost(postId, reblogKey, callback) {
return this.postRequest('/v2/user/like', { id: postId, reblog_key: reblogKey }, callback);
Expand All @@ -577,7 +577,7 @@ class TumblrClient {
* @param {string} reblogKey - Reblog key of post to like
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
unlikePost(postId, reblogKey, callback) {
return this.postRequest('/v2/user/unlike', { id: postId, reblog_key: reblogKey }, callback);
Expand All @@ -589,7 +589,7 @@ class TumblrClient {
* @param {{url: string}|{email:string}} params - parameters sent with the request
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
followBlog(params, callback) {
return this.postRequest('/v2/user/follow', params, callback);
Expand All @@ -601,7 +601,7 @@ class TumblrClient {
* @param {{url: string}} params - parameters sent with the request
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
unfollowBlog(params, callback) {
return this.postRequest('/v2/user/unfollow', params, callback);
Expand All @@ -614,7 +614,7 @@ class TumblrClient {
* @param {string} postId - Post ID to delete
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
deletePost(blogIdentifier, postId, callback) {
return this.postRequest(`/v2/blog/${blogIdentifier}/post/delete`, { id: postId }, callback);
Expand All @@ -629,7 +629,7 @@ class TumblrClient {
* @param {Record<string,any>} params - parameters sent with the request
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
reblogPost(blogIdentifier, params, callback) {
return this.postRequest(`/v2/blog/${blogIdentifier}/post/reblog`, params, callback);
Expand All @@ -642,7 +642,7 @@ class TumblrClient {
* @param {{'fields[blogs]'?: string}|TumblrClientCallback} [paramsOrCallback] - query parameters
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
blogInfo(blogIdentifier, paramsOrCallback, callback) {
return this.getRequest(`/v2/blog/${blogIdentifier}/info`, paramsOrCallback, callback);
Expand All @@ -655,7 +655,7 @@ class TumblrClient {
* @param {{limit?: number; offset?: number; before?: number; after?: number}|TumblrClientCallback} [paramsOrCallback] - optional data sent with the request
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
blogLikes(blogIdentifier, paramsOrCallback, callback) {
return this.getRequest(`/v2/blog/${blogIdentifier}/likes`, paramsOrCallback, callback);
Expand All @@ -668,7 +668,7 @@ class TumblrClient {
* @param {{limit?: number; offset?: number}|TumblrClientCallback} [paramsOrCallback] - optional data sent with the request
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
blogFollowers(blogIdentifier, paramsOrCallback, callback) {
return this.getRequest(`/v2/blog/${blogIdentifier}/followers`, paramsOrCallback, callback);
Expand All @@ -692,7 +692,7 @@ class TumblrClient {
* @param {{limit?: number; offset?: number; filter?: 'text'|'raw'}|TumblrClientCallback} [paramsOrCallback] - optional data sent with the request
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
blogQueue(blogIdentifier, paramsOrCallback, callback) {
return this.getRequest(`/v2/blog/${blogIdentifier}/posts/queue`, paramsOrCallback, callback);
Expand All @@ -705,7 +705,7 @@ class TumblrClient {
* @param {{before_id?: number; filter?: PostFormatFilter}|TumblrClientCallback} [paramsOrCallback] - optional data sent with the request
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
blogDrafts(blogIdentifier, paramsOrCallback, callback) {
return this.getRequest(`/v2/blog/${blogIdentifier}/posts/draft`, paramsOrCallback, callback);
Expand All @@ -718,7 +718,7 @@ class TumblrClient {
* @param {{offset?: number; filter?: PostFormatFilter}|TumblrClientCallback} [paramsOrCallback] - optional data sent with the request
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
blogSubmissions(blogIdentifier, paramsOrCallback, callback) {
return this.getRequest(
Expand All @@ -735,7 +735,7 @@ class TumblrClient {
* @param {16|24|30|40|48|64|96|128|512|TumblrClientCallback} [sizeOrCallback] - optional data sent with the request
* @param {TumblrClientCallback} [maybeCallback] - invoked when the request completes
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
blogAvatar(blogIdentifier, sizeOrCallback, maybeCallback) {
const size = typeof sizeOrCallback === 'function' ? undefined : sizeOrCallback;
Expand All @@ -752,7 +752,7 @@ class TumblrClient {
*
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
userInfo(callback) {
return this.getRequest('/v2/user/info', undefined, callback);
Expand All @@ -764,7 +764,7 @@ class TumblrClient {
* @param {Record<string,any>|TumblrClientCallback} [paramsOrCallback] - query parameters
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
userDashboard(paramsOrCallback, callback) {
return this.getRequest('/v2/user/dashboard', paramsOrCallback, callback);
Expand All @@ -776,7 +776,7 @@ class TumblrClient {
* @param {{limit?: number; offset?: number;}|TumblrClientCallback} [paramsOrCallback] - query parameters
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
userFollowing(paramsOrCallback, callback) {
return this.getRequest('/v2/user/following', paramsOrCallback, callback);
Expand All @@ -788,7 +788,7 @@ class TumblrClient {
* @param {{limit?: number; offset?: number; before?: number; after?: number}|TumblrClientCallback} [paramsOrCallback] - query parameters
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
userLikes(paramsOrCallback, callback) {
return this.getRequest('/v2/user/likes', paramsOrCallback, callback);
Expand All @@ -801,7 +801,7 @@ class TumblrClient {
* @param {Record<string,any>|TumblrClientCallback} [paramsOrCallback] - query parameters
* @param {TumblrClientCallback} [callback] **Deprecated** Omit the callback and use the promise form
*
* @return {Promise<any>|undefined} Request object, or Promise if {@link returnPromises} was used
* @return {Promise<any>|undefined} Promise if no callback is provided
*/
taggedPosts(tag, paramsOrCallback, callback) {
const params = { tag };
Expand Down

0 comments on commit bf870c8

Please sign in to comment.