Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@tlovett1
Copy link
Member

JS has been refactored, cleaned up, and prepared for V2. Right now there are some holes such as:

  • Meta endpoints
  • Schema endpoints. Need some feedback here. Not sure these are necessary.
  • Post based term endpoints such as /posts/1/terms/post_tag

There is also more cleanup to do, especially surrounding documentation.

All feedback is welcome :)

Fixes #1320

wp-api.js Outdated
Copy link
Member

Choose a reason for hiding this comment

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

@tlovett1 avatar_url should now return an object

@rachelbaker
Copy link
Member

@tlovett1 Can you merge develop into your branch? That will fix the PHPCS errors that are causing the build on your PR to appear as though it is failing.

@WP-API/amigos How should we approach this? I was thinking we could merge Taylor's initial pass and then iterate from there. Any objections?

@danielbachhuber
Copy link
Member

How should we approach this? I was thinking we could merge Taylor's initial pass and then iterate from there. Any objections?

I'm fine with this. Before we merge though, can one of you open another issue with a checklist of the remaining changes / improvements needing to be made?

@tlovett1
Copy link
Member Author

tlovett1 commented Jul 6, 2015

@rachelbaker merged in develop.

@tlovett1
Copy link
Member Author

Any updates? @rachelbaker @rmccue

@rmccue
Copy link
Member

rmccue commented Jul 22, 2015

@tlovett1 Is this also updated over at https://github.com/WP-API/client-js ? I'd like to ensure we maintain that repo as the canonical source for the JS for now, given that it'll probably need further updating too.

Happy to merge, would like a quick review from @mattheu or @kadamwhite first.

@rmccue rmccue added this to the 2.0 milestone Jul 22, 2015
@rmccue rmccue added the Bug label Jul 22, 2015
@rmccue rmccue modified the milestones: 2.0 Beta 4, 2.0 Jul 22, 2015
@tlovett1
Copy link
Member Author

@rmccue The client js repo is updated now.

wp-api.js Outdated
Copy link
Member

Choose a reason for hiding this comment

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

This should still be X-WP-Nonce, PHP just internally mangles the name.

@kadamwhite
Copy link
Contributor

Will take a look a bit later today , thanks for tagging me Ryan

wp-api.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

This ought to go inside the IIFE—this will impact other included scripts if somebody uses a plugin to concatenate this with any of their other JS dependencies.

wp-api.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Syntax error: should be 'undefined' === typeof response.author, as it is below. Although since we have Underscore I'd probably _.isUndefined()

@kadamwhite
Copy link
Contributor

Looks good! Found one syntax error and a couple areas where we could clarify the code or simplify it with Underscore methods, but that's about it

@tlovett1
Copy link
Member Author

@rmccue worked in most of @kadamwhite's feedback (thanks!). Let me know if you need anything else.

@kadamwhite
Copy link
Contributor

looks good

rachelbaker added a commit that referenced this pull request Jul 29, 2015
@rachelbaker rachelbaker merged commit 9554e03 into WP-API:develop Jul 29, 2015
@rachelbaker
Copy link
Member

Merged #1374

Thank you @tlovett1 and @kadamwhite

@Jany-M
Copy link

Jany-M commented Oct 17, 2016

From #1350:

Any specific updates on issues with s?
Even updating wp-api.js to the latest build, search & filter[s] both return empty and s returns all posts.
http://demo.wp-api.org/wp-json/wp/v2/posts?s=libero does not work, it just shows all posts, regardless the s.

@kadamwhite
Copy link
Contributor

@Jany-M, the behavior of the ?search= query parameter (which should be used in place of filter[s] or s) would not be impacted by the JS client — if you're finding that search results are not appearing as expected that would be an issue with the API endpoint itself, and I'd encourage you to open an issue so we can dig into the problem and determine whether it might be a bug!

@Jany-M
Copy link

Jany-M commented Oct 17, 2016

@kadamwhite using searchunfortunately leaves me with an empty result as well.
I opened #2847.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants