Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Filter (More) Fields plugin - useful? #160

Open
theprojectsomething opened this issue Jul 17, 2016 · 0 comments
Open

Filter (More) Fields plugin - useful? #160

theprojectsomething opened this issue Jul 17, 2016 · 0 comments

Comments

@theprojectsomething
Copy link

Put together a very basic plugin last night that allows deep filtering of returned data via query vars. Uses syntax close to the Facebook Graph API for accessing inner fields, e.g.
{api_endpoint}/posts?fields=id,acf{related_posts.limit(2){id}}

[{
  "id": 1,
  "acf": {
    "related_posts": [
      { "id": 2 },
      { "id": 3 }
    ]
  }
}]

Github repo is here: https://github.com/theprojectsomething/REST-API-Filter-More-Fields

Yet to publish on WP.org but it's currently working and is handy in combination with other API plugins like ACF To WP API. Keen to get some thoughts on the usefulness of the syntax before putting more effort in.

@kadamwhite kadamwhite added this to the Add-Ons & Extensions milestone Aug 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants