tumblr / docs

Tumblr's public platform documentation.
Apache License 2.0
109 stars 27 forks source link

Notifications documentation doesn't seem to match reality #43

Open sorin-costea opened 3 years ago

sorin-costea commented 3 years ago

When looking at the /notifications endpoint documentation:

AprilSylph commented 3 years ago

the way the official web client does it is /notifications?types[0]=like&types[1]=reply to filter to likes and replies

AprilSylph commented 3 years ago

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

sorin-costea commented 3 years ago

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.

sorin-costea commented 3 years ago

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.

cyle commented 3 years ago

Thanks for this feedback -- we'll update the API docs with examples to help clarify this! 👌

sorin-costea commented 3 years ago

Maybe you can also mention the developers that requesting reblog_with_content type, will return reblog type notes...