Add user endpoints #20

Closed
rmccue opened this Issue Nov 7, 2013 · 12 comments

Comments

Projects
None yet
5 participants

@ghost ghost assigned rmccue Nov 7, 2013

rmarji commented Nov 15, 2013

how can I get this?

For now you can check out my repo - https://github.com/royboy789/WP-API it
has the code base for users in it.

On Fri, Nov 15, 2013 at 11:29 AM, rmarji notifications@github.com wrote:

how can I get this?


Reply to this email directly or view it on GitHubhttps://github.com/WP-API/WP-API/issues/20#issuecomment-28596587
.

Thank You,
Roy Sivan
www.roysivan.com
GuavaWorks
www.guavaworks.com
818.925.4214
415.889.9346

Is there any update on when this will make it in to the master repository?
Can I help out in anyway?
Thanks!

Contributor

tobych commented Mar 28, 2014

I could really do with this for a current project. @rmccue, what are your thoughts on @royboy789's work so far? @royboy789, I suggest you at least commit your work to a branch, and keep your master up-to-date with the upstream, rebasing as you go. That way Ryan can merge your code way more easily.

Contributor

tobych commented Mar 28, 2014

Actually, IIRC the API changed since Roy's work, so it needs re-doing.

Contributor

tobych commented Mar 29, 2014

I've made a start on the users endpoint at tobych/WP-API@72f4942

It's based on @royboy789 's work, but redone against the current code. It's on a branch, which is rebased against master. No unit tests, no POSTing, and I'm ignoring $fields. It works for me. Next I'll try to get POST working. Then try to get out the extended/custom user attributes that plugins such as s2members add (which is what I need this for). This is pretty naive code, because I'm utterly naive about WP. I doubt we should be including the user's password, for one thing. I hope this isn't a waste of your time, having a look at this!

Contributor

tobych commented Mar 29, 2014

I've got editing (PUT/PATCH) working on some fields: https://github.com/tobych/WP-API/compare/users
Also I've realized there's already an entity defined for User in the documentation. It has very few fields though.

Contributor

tobych commented Mar 29, 2014

I have DELETE working. I've realized that in WP, users have standard fields and "meta" fields, including some default fields. I guess they need to be handled cleverly. I want to get these out, next. Perhaps into a separate JSON dictionary within the main one.

Contributor

tobych commented Mar 30, 2014

I have PUT/PATCH and GET working nicely with metadata now. I'm representing data from serialized fields using a dictionary with a "unserialized" (and, for now, "serialized") key, so things work round-trip without the server needing to guess whether to serialize things. I've also moved the metadata to user_meta, away from the meta stuff already included in the User entity's definition (and implementation for Posts). One question is whether to bother representing every user_meta value as an array, or just do that when there really are multiple values. For now I'm always using an array, as anything else complicates things in the code.

Owner

rmccue commented Apr 6, 2014

@tobych As noted in #68, can you please open a pull request for your branch without the meta handling? We can handle that separately. I like the way you've implemented it so far, so a pull request would help me review it and get it merged. :)

Contributor

tobych commented Apr 8, 2014

I've just opened a pull request for this work without the meta handling.

Owner

rmccue commented Apr 9, 2014

Pull request from @tobych is #128, and a great start.

@rmccue rmccue referenced this issue Apr 20, 2014

Merged

Add user endpoints #146

5 of 5 tasks complete

@rachelbaker rachelbaker closed this in #146 Apr 30, 2014

rachelbaker added a commit that referenced this issue Apr 30, 2014

Merge pull request #146 from WP-API/user-endpoints
Add endpoints to handle user management.  Closes #20.

kellbot pushed a commit to kellbot/WP-API that referenced this issue Aug 1, 2014

Merge pull request #146 from WP-API/user-endpoints
Add endpoints to handle user management.  Closes #20.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment