I want to link my website's Wordpress database to mobile application; and I am able to generate the APIs using wp-json plugin in Wordpress.
However, there is a lot of unwanted data which I do not want for the app. What are the custom parameters in the API url which will help me get only the information I am looking for?
http://www.indiafastener.com/wp-json/wp/v2/posts/2031
PS: I know I can manage & eliminate the unwanted information through the app as well however I do not want to unnecessarily pile up lot of data & do filters in the App.
Thanks for your time.
Utpal
Modern versions of WordPress have the REST API built into core therefore a plugin isn't required.
To check the arguments for an API call, take a look at the documentation. For retrieving a post, see: https://developer.wordpress.org/rest-api/reference/posts/#retrieve-a-post. There are no arguments for limiting the data provided by the response.
While it is possible to modify the response (https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/), I'd advise against it.
As you pointed out in your question, this data can be managed on the app side. I'd argue that is where you should be dealing with it. It's not about eliminating 'unwanted information' but rather recognising the information you do want.
Related
I am communicating with the guys over at google and they are helping us with our site 'central.bet.co.za'.
The guys over at google are saying that they need me to supply them with "CORS Compliant Predictive JSON Endpoint for the same."
I really dont know where to find this information as I have never used json before or wordpress for that matter
I have tried installing the json.api.user plugin but that doesnt seem to be solving any problems either
Do you mean the Wordpress core Rest API?
http://central.bet.co.za/wp-json/wp/v2/pages
I'm researching the possibility of styled reporting on Wordpress, fed by Smartsheet data. My idea is to on click or even on frequency/date, get grid content from SmartSheet API and publish to a Wordpress post. I want the columns/cells/rows to output as html objects (ideally integration code allows me to create classes based on column and/or cell content logic) so I can style with CSS.
As someone with strong technical skills but no deep coding ability, am I being crazy to attempt self-teaching and building this? I feel like logically it seems pretty possible. If it is I would learn and execute myself.
Thoughts on how feasible, potential roadblocks?
Getting data from Smartsheet via its API into a Wordpress page is achievable. The biggest hurdle I can see you running into is since the Smartsheet API doesn't have support for CORS you won't be able to make requests to the Smartsheet API directly from the page on the front end. You'll need to build out some back end code that lives on your server that interacts with the Smartsheet API and your Wordpress site calls that code to get the data it needs.
I am trying to use the Jira REST API to submit issues.
This answer gives a POST method to submit issues
how to create an issue in jira via rest api?
Is there a way to integrate POST with html so you could submit things from a webpage?
If this is not possible, is there another way to create jira issues from a webpage?
I initially tried using the issue collector but it does not offer enough flexibility.
We are trying to have three required fields that combine to form the description, much like how the first example feedback from in the issue collector has a rating and then "what did you like" "what did you not like" boxes.
Sorry this question was initially rather unclear.
Thank you!
The JIRA API is primarily intended for use from scripts, not from web pages. There is no way to securely allow a web page to access the JIRA API directly.
If you want to allow users to create JIRA issues from a web page, use a JIRA issue collector.
I'm converting my Play 2 application to a SPA and I'm trying to figure out how to still use SecureSocial for authentication.
I'm removing all the HTML templates (except the ones used by SecureSocial to send emails) and modifying my controllers to only provide JSON responses.
Is it possible to prevent SecureSocial from rendering HTML and let my application exchange authentication data in JSON format? Is there any example or tutorial that explains this topic? I've been googling for a few days now and unable to find any useful or at least understandable information for a newbie like me.
Latest changes in master made SecureSocial more friendly with mobile and SPA apps. You can now use the LoginApi controller to authenticate a user using the UsernamePasswordProvider or any of the OAuth2 based providers.
I have a web app that data is submitted from a Ui embedded in a Google Site and saved in a spreadsheet. I am thinking about switching to scriptDB instead, but I am unsure about querying and displaying data dynamically. The last time I checked it was not possible to refresh a sites page from within a script, so as a work around I wrote a .html page with javascript that accesses the spreadsheet via the key and uses the Visualization DataTables to produce a quick and nicely formatted query. I would like to retain this functionality if possible. Could anyone make some possible suggestions?
Regards,
Shawn
This is doable today via UiApp (see the Charts api, and note that you can add a Chart to a UiApp).
To auto refresh:
You can use CheckBox.setValue(value, fireEvents) - but you may hit quota issues (there is an example somewhere around). If you hit quota issues, then I suspect HTML service is your best option. It also gives you better control.
Here is an open item requesting expanded Charts service integration with Gviz.
Although, there is limited integration at present, it needs to be expanded to group variables in tables to facilitate basic count and sum operations.
I suggest you “star” the issue to vote for it and to be notified of new developments.