Skip to content

Conversation

@carlitorweb
Copy link
Member

@carlitorweb carlitorweb commented Jan 5, 2023

Joomla by default will return a JSON API Responses when requested with an Accept: application/json header as well as with the specific JSON API header. This tutorial help build a different response, in this case, a JSON response.

The goals

  • Get a JSON response from the Joomla API
  • Create the necessary webservices plugin and the API part of the component
  • Use a module params for model the data we will send in the API response

@HLeithner
Copy link
Member

PR looks promising.

2 things, first we save the assets in a "assets" subdirectory relative to the markdown file.
second could you please polish the object with correct intention, don't know if type php makes a better highlight instead of log

https://github.com/joomla/Manual/pull/74/files#diff-5da70ead77cf722313403be6eea7779dc1b0a8986fb24f5fa5bf03e37ffed372R418-R443

@carlitorweb
Copy link
Member Author

carlitorweb commented Jan 5, 2023

2 things, first we save the assets in a "assets" subdirectory relative to the markdown file.
second could you please polish the object with correct intention, don't know if type php makes a better highlight instead of log

Done.

PR looks promising.

Thank you, glad to hear that

@HLeithner
Copy link
Member

you have a TODO about joomla/joomla-cms#39498 which is already merged. so you can remove this function completly because the documentation is for j4.3 please

@carlitorweb
Copy link
Member Author

carlitorweb commented Jan 5, 2023

I was thinking that maybe someone apply this for 4.2, then will not work as expected. Is not better wait to 4.3 arrive, and then update the doc? If not, I delete it not problem. If that is the case, should I highlight somewhere this tutorial is for 4.3+ ?

Also, let me kown any other changes I need do to the tutorial, I will glad to do it.

@carlitorweb
Copy link
Member Author

carlitorweb commented Jan 5, 2023

My bad, the merged of that PR was in 4.2-dev branch...not sure why I saw 4.3. But apply something similar, current version do not have it...

@HLeithner
Copy link
Member

In the top left corner you see that this documentation targets version 4.3
image

We don't have and plan a 4.2 version.

but good that you found out that it already works in 4.2 ;-)

@HLeithner
Copy link
Member

Hi I merged the webservices pr #41 which can be found here https://manual.joomla.org/docs/general-concept/webservices/ can you please restructure your pr in a way that it fits together?

@carlitorweb
Copy link
Member Author

@HLeithner both articles are related, but in different layers. #41 is how you build the request for consume the API. This tutorial is how you build the response.

As far I see, for connect both is just need #41 write a small section of how add the Header: application/json and point to this article for how should be structure the response for get the json.

Let me kown if anything anyway, maybe I understood wrong what do you meant

@HLeithner
Copy link
Member

hopefully @bembelimen can help here, I'm only for technical issues with docusaurus here

@carlitorweb
Copy link
Member Author

carlitorweb commented Jan 15, 2023

@HLeithner In my opinion, you can merge this tutorial as is now. All used here is straight forward really. The only significan change is the View part, but is easy to check (in case the tutorial is holded because need be checked first by someone)

@HLeithner
Copy link
Member

@carlitorweb as said it's not longer in my responsibility

In my opinion "Web Services API" has nothing to do on the first level document but if you find someone who want's to manage the documentation please contact @bembelimen

@HLeithner HLeithner merged commit ca34d16 into joomla:main Mar 7, 2023
@HLeithner
Copy link
Member

Can be moved if it doesn't here, thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants