Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require params for create/edit post #168

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/tumblr.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,13 @@ class TumblrClient {
* @see {@link https://www.tumblr.com/docs/api/v2#posting|API Docs}
*
* @param {string} blogIdentifier - blog name or URL
* @param {Record<string,any>|TumblrClientCallback} [paramsOrCallback]
* @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
*/
createPost(blogIdentifier, paramsOrCallback, callback) {
return this.postRequest(`/v2/blog/${blogIdentifier}/post`, paramsOrCallback, callback);
createPost(blogIdentifier, params, callback) {
return this.postRequest(`/v2/blog/${blogIdentifier}/post`, params, callback);
}

/**
Expand All @@ -428,13 +428,13 @@ class TumblrClient {
* @deprecated Legacy post creation methods are deprecated. Use NPF methods.
*
* @param {string} blogIdentifier - blog name or URL
* @param {Record<string,any>|TumblrClientCallback} [paramsOrCallback]
* @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
*/
editPost(blogIdentifier, paramsOrCallback, callback) {
return this.postRequest(`/v2/blog/${blogIdentifier}/post/edit`, paramsOrCallback, callback);
editPost(blogIdentifier, params, callback) {
return this.postRequest(`/v2/blog/${blogIdentifier}/post/edit`, params, callback);
}

/**
Expand Down