ashwinks / Trello-API-PHP-Wrapper

A PHP wrapper for the Trello API
37 stars 14 forks source link

Add delete method to Object class #5

Open TheBrockEllis opened 9 years ago

TheBrockEllis commented 9 years ago

This wrapper has almost everything that I need except this part: being able to delete a card via the API. I've added a delete() in the Object class right below the get() method and it works like a charm.

My question is- what should be returned once the card is deleted? I've currently got it returning true and it seems to work, but I'm not sure if that's the best thing to use in this situation.

ashwinks commented 9 years ago

What comes back from the API when you call delete?

TheBrockEllis commented 9 years ago

When I log out the response, it looks like an associative array with one key and an empty value.

error_log( print_r($response, true) );

produces

Array\n(\n [_value] => \n)\n

ashwinks commented 9 years ago

Ah looks like it returns nothing. Returning true in your case make sense, I'll do the merge. Thanks!

TheBrockEllis commented 9 years ago

Hi there, @ashwinks. Is there anything else I can do here to help out?