appdotnet / api-spec

App.net API Documentation is on the web at https://developers.app.net. Source for these docs is in the new-docs branch here. Please use the issue tracker and submit pull requests! Help us build the real-time social service where users and developers come first, not advertisers.
https://developers.app.net
950 stars 98 forks source link

Post returned by a delete call does not have is_deleted set #126

Closed beccadax closed 12 years ago

beccadax commented 12 years ago

When I send a DELETE to /stream/0/posts/[post_id], the JSON I get back does not include an is_deleted key. Requests sent a moment later do seem to include is_deleted, so it clearly worked; it's just not reflected in the immediate response.

The fact that the post was deleted can presumably be inferred from the 200 response code, but that seems like a road to very messy code that's constantly patching the server's responses with things it "knows" to be true. If the delete request went through, the server should say that the post has been deleted.

mthurman commented 12 years ago

Thanks for the bug report! We just rolled out a fix for this.

kosso commented 12 years ago

Is every Post object (in any list too) supposed to have is_deleted set? (true|false)

Or is is only set when is_deleted===true ?

Currently it's returning undefined on lists. Unless it's true.

K

On 23 August 2012 21:46, Mark Thurman notifications@github.com wrote:

Thanks for the bug report! We just rolled out a fix for this.

— Reply to this email directly or view it on GitHubhttps://github.com/appdotnet/api-spec/issues/126#issuecomment-7983491.

mthurman commented 12 years ago

Right now it's being omitted unless true: https://github.com/appdotnet/api-spec/blob/master/objects.md#post-fields

kosso commented 12 years ago

got it. that one had me foxed for a bit. looking for a boolean on a possibly undefined.

wouldn't it be better to just have the boolean there always?

On 23 August 2012 23:51, Mark Thurman notifications@github.com wrote:

Right now it's being omitted unless true: https://github.com/appdotnet/api-spec/blob/master/objects.md#post-fields

— Reply to this email directly or view it on GitHubhttps://github.com/appdotnet/api-spec/issues/126#issuecomment-7986989.

beccadax commented 12 years ago

Yup, my code is now seeing an is_deleted immediately. Thanks!