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

Added user functions #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MichielDeMey
Copy link

Implemented user functions according to http://codex.wordpress.org/XML-RPC_WordPress_API/Users

TODO:

  • Document usage in README

@scottgonzalez
Copy link
Owner

Thanks. I'm really busy this weekend, but I'll try to review this within the next week. If I haven't given another update toward of the end of next week, feel free to ping me.

@MichielDeMey
Copy link
Author

No problem, take your time.
I still have to edit the README anyway.

@scottgonzalez
Copy link
Owner

I never got back to this because I removed it from my todo list when you said you were going to write docs. Let me know if you've got time to do that. If not, I can write them up.

@@ -257,6 +257,88 @@ extend( Client.prototype, {
}
});

extend( Client.prototype, {
getUsersBlogs: function( fn ) {
this.credentialsCall( "wp.getUsersBlogs", fn);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.authenticatedCall

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before the closing paren.

@scottgonzalez
Copy link
Owner

Overall this looks pretty good. I'll do some actual testing soon.

@MichielDeMey
Copy link
Author

Sorry to say I currently don't have any time to edit the README.
Care to help out? :)

@NathanKleekamp
Copy link
Contributor

Is the only thing preventing this from being merged the README? I'm happy write up the docs. If something else needs to be done, I'm happy to take on those edits on as well.

Thanks for your work on this guys!

@scottgonzalez
Copy link
Owner

@NathanKleekamp That would be great. There are also some outstanding comments from my earlier review that need to be addressed. Thanks!

@NathanKleekamp
Copy link
Contributor

NathanKleekamp commented Sep 28, 2016

OK, I've brought down @MichielDeMey 's changes into my local repo. Once I'm finished, I'm going to submit this as a separate pull request, since I don't have write access to his fork. Otherwise, I think I'd have to submit my changes as a pull request to his pull request. This way he doesn't need to take any further action.

Sound OK?

@MichielDeMey
Copy link
Author

A PR to my PR sounds like a possible solution.

@scottgonzalez
Copy link
Owner

A PR to @MichielDeMey's branch is certainly possible, but will put the discussion into his fork rather than here. Starting a new PR sounds good. I'll wait until you submit the new PR before closing this one.

@NathanKleekamp
Copy link
Contributor

OK, one thing I've come across is that wp.getUsersBlogs doesn't play nicely with this.authenticatedCall because this.authenticatedCall always inserts the blogId as a param, which works swimmingly in most situations, however, wp.getUsersBlogs only accepts username and password. When making the authenticatedCall, it throws Error: XML-RPC fault: Incorrect username or password.

Are you all OK with me dropping wp.getUsersBlogs from the PR until such time this.authenticatedCall can accommodate this case?

@scottgonzalez
Copy link
Owner

Sure. When I get some time I can look into how to make that call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants