Trello-API-PHP-Wrapper icon indicating copy to clipboard operation
Trello-API-PHP-Wrapper copied to clipboard

Add delete method to Object class

Open TheBrockEllis opened this issue 10 years ago • 4 comments

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.

TheBrockEllis avatar Oct 07 '15 19:10 TheBrockEllis

What comes back from the API when you call delete?

ashwinks avatar Oct 07 '15 19:10 ashwinks

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

TheBrockEllis avatar Oct 07 '15 19:10 TheBrockEllis

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

ashwinks avatar Oct 07 '15 20:10 ashwinks

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

TheBrockEllis avatar Oct 12 '15 20:10 TheBrockEllis