docs
docs copied to clipboard
Notifications documentation doesn't seem to match reality
When looking at the /notifications
endpoint documentation:
- it gives for the
types
parameter a String[] type, but how does an array look for a query parameter??? Any URL example please? - Anything I send there seems to have zero effect on the response, I always receive all notification types. I tried with
types=[like]
andtypes=like
andtypes=[like,reply]
andtypes=like,reply
so because of point above I can't tell whether it's my fault or filtering is simply not working. - it mentions the
_links
response object however that object is never returned. Do I need to send an undocumented query parameter to get it? - I could have tried more variants but it's a hassle as the API console doesn't support this endpoint, so here I am asking you :) thank you!
the way the official web client does it is /notifications?types[0]=like&types[1]=reply
to filter to likes and replies
as far as i can see, an array for a query parameter should look like your fourth example:
const parameters = new URLSearchParams();
parameters.set('types', ['like', 'reply']);
console.log(parameters.toString()); // "types=like%2Creply"
so assuming you're encoding the comma correctly as above, the documentation really needs to specify the API's nonstandard array parameter format
I can confirm /notifications?types[0]=like&types[1]=reply
is working, although the return types aren't always from the types list :) (hello reblog_with_content
)
As for the [] format, I tried with types=reply
and it did no filtering, so comma can't be the culprit. It's just a weird serialization.
So in case somebody needs the Java client, my Jumblr fork retrieves now the notifications feed. I didn't bother with a pull request as the original client project is abandoned.
Thanks for this feedback -- we'll update the API docs with examples to help clarify this! 👌
Maybe you can also mention the developers that requesting reblog_with_content
type, will return reblog
type notes...