News for hackers. Stuff that matters.
Re:Show HN: Deck of Cards – A playing card API by xnxn on Monday May 11, 2015 @01:42AM (#9522913)
> Drawing a card is definitely a GET.

I see where you're coming from ("I'm drawing / taking / GETting some cards"), but drawing cards is not an idempotent action. I would implement it as a POST.

Re:Show HN: Deck of Cards – A playing card API by Confusion on Monday May 11, 2015 @03:43AM (#9523245)
In some sense you are PATCHing the deck by removing a card.
Re:Show HN: Deck of Cards – A playing card API by hartror on Monday May 11, 2015 @04:42AM (#9523384)
I've yet to see a case for PATCH that couldn't be solved with more clarity for everyone involved by a new resource.
Re:Show HN: Deck of Cards – A playing card API by ryan-allen on Monday May 11, 2015 @03:24AM (#9523200)
I think it's more of a terminology thing, rather than 'GET me a card' you could 'POST remove 2 cards from the deck' and the side effect is the response tells you which cards were deleted.

But this kind of bike shedding drives me mad because oh my lord who gives a crap just build software and document it properly.

Re:Show HN: Deck of Cards – A playing card API by Confusion on Monday May 11, 2015 @03:44AM (#9523256)
I give a crap, because when I see an API, I expect a GET to be idempotent. If a coworker implemented this, there would be words.
Re:Show HN: Deck of Cards – A playing card API by whyaduck on Monday May 11, 2015 @12:46PM (#9526060)
Same here. Working on a large codebase where people "just build software and document it properly" without following standards is not fun. Not to mention that frequently people end up shortening that to "just build software". It's better to get in the habit of following good standards even on small projects before bad habits form.
Re:Show HN: Deck of Cards – A playing card API by wetmore on Monday May 11, 2015 @03:35AM (#9523225)
It's not necessarily bike shedding though. GET and POST have two different, widely-agreed upon semantic meanings. It's not just terminology.