Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix additional format with application/json #1885

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mingan666
Copy link

Fix #1847

Adds additional format for media type application/json

@plegall Hopefully this fix might be more acceptable then the previous attempt (#1847)

@mingan666
Copy link
Author

I see I forgot to update after my fixes. I'll try to find some time to update my patch later today...

@mingan666
Copy link
Author

Think I fixed the issues. Please let me know what you think.

@klaoun
Copy link

klaoun commented Apr 7, 2023

for example when I want to add categories I put the name in "name" --> json(application/json) and I invoke
it gives me the result

error 400
"Cannot process your request. Unknown response format.
Request format: rest Response format: jsonalt
PwgServer::__set_state(array(
'_requestHandler' => "

but why is this

THANKS

@mingan666
Copy link
Author

mingan666 commented Apr 8, 2023

I don't really understand your question.
For me the following works:

https://<hostname>/ws.php?format=jsonalt&method=pwg.images.getInfo&image_id=11

{
    "stat": "ok",
    "result": {
        "id": 11,
        "file": "DSC08817.jpg",
...

and after login:

https://<hostname>/ws.php?format=jsonalt&method=pwg.categories.add&name=test

{
    "stat": "ok",
    "result": {
        "info": "Album added",
        "id": 49
    }
}

However I've given up and moved to another gallery implementation due to the bad response on both github and the forum from those that understand the system. It's to hard to fix the integrations I need.

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.

Piwigo API returns wrong mediatype
2 participants