Skip to content

REST API: Posts: Enable querying by custom taxonomy terms#7004

Merged
zinigor merged 1 commit intofeature/sync-json-endpointsfrom
sync/list-posts-endpoint
Apr 24, 2017
Merged

REST API: Posts: Enable querying by custom taxonomy terms#7004
zinigor merged 1 commit intofeature/sync-json-endpointsfrom
sync/list-posts-endpoint

Conversation

@zinigor
Copy link
Copy Markdown
Contributor

@zinigor zinigor commented Apr 20, 2017

Previously had only been possible to query by category or tag

Merges r140311-wpcom.

@zinigor zinigor added [Package] Sync [Status] Needs Review This PR is ready for review. labels Apr 20, 2017
@zinigor zinigor self-assigned this Apr 20, 2017
@zinigor zinigor requested a review from aduth April 20, 2017 00:54
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like this was duplicated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, you're right, I'll fix that, thank you!

Previously had only been possible to query by category or tag

Merges r140311-wpcom.
@zinigor zinigor force-pushed the sync/list-posts-endpoint branch from 191b239 to 3b85420 Compare April 21, 2017 15:53
@zinigor
Copy link
Copy Markdown
Contributor Author

zinigor commented Apr 21, 2017

@aduth I have fixed the duplicated code, thanks for taking a look!

@zinigor zinigor changed the base branch from master to feature/sync-json-endpoints April 21, 2017 15:54
@zinigor
Copy link
Copy Markdown
Contributor Author

zinigor commented Apr 21, 2017

Master issue: #7026

Copy link
Copy Markdown
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@eliorivero
Copy link
Copy Markdown
Contributor

I tested this on my site adding a custom taxonomy and hitting this in api console
/sites/DOTORGSANDBOX/posts/?term=testslug
and it's returning nothing. I do have a post with that term.

@aduth
Copy link
Copy Markdown
Member

aduth commented Apr 24, 2017

@eliorivero The correct parameter would be ?term[post_tag]=testslug if it's a tag you're trying to query.

@eliorivero
Copy link
Copy Markdown
Contributor

Great @aduth! it works with that syntax, except I had created a tax so it's like
/sites/DOTORGSANDBOX/posts/?term[testaxonomy]=testslug
Thanks!

@eliorivero eliorivero added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Apr 24, 2017
Copy link
Copy Markdown
Contributor

@eliorivero eliorivero left a comment

Choose a reason for hiding this comment

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

LGTM 🐑

@zinigor zinigor merged commit f858f87 into feature/sync-json-endpoints Apr 24, 2017
@zinigor zinigor removed the [Status] Ready to Merge Go ahead, you can push that green button! label Apr 24, 2017
@zinigor zinigor deleted the sync/list-posts-endpoint branch April 24, 2017 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants