Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get response from some APIs #56

Open
abhi18av opened this issue Nov 12, 2018 · 2 comments
Open

Unable to get response from some APIs #56

abhi18av opened this issue Nov 12, 2018 · 2 comments

Comments

@abhi18av
Copy link

Hi @crobertsbmw !

First off, thanks for contributing this wonderful project to open source, I'm learning how to write API clients using this API 馃憤

I'd like to report that I'm not able to get the noted response from certain APIs

an example deck-id generated via curl "https://deckofcardsapi.com/api/deck/new/" is tyx9b4bo0h5c upon which I apply the add cards to pile api call like the following

curl "https://deckofcardsapi.com/api/deck/tyx9b4bo0h5c/pile/pile1/add/?cards=AS,2S,2C,KC,AH,2H,KH"
  • Shuffle piles
curl "https://deckofcardsapi.com/api/deck/tyx9b4bo0h5c/pile/pile1/shuffle?cards=AS,2S,2C,KC,AH,2H,KH"


  • Listing cards in a pile
curl "https://deckofcardsapi.com/api/deck/tyx9b4bo0h5c/pile/pile1/list?cards=AS"

  • Drawing from piles
curl "https://deckofcardsapi.com/api/deck/tyx9b4bo0h5c/pile/pile1/draw/?cards=AS" 
@abhi18av
Copy link
Author

Could you please help me out a bit here ?

@abhi18av abhi18av changed the title Unable to get response from some apis Unable to get response from some APIs Nov 12, 2018
@crobertsbmw
Copy link
Owner

crobertsbmw commented Nov 12, 2018

Have you drawn those cards from the deck? You can't add a card to a pile until you have first drawn it from the deck. As stated in the docs:

Piles can be used for discarding, players hands, or whatever else. Piles are created on the fly, just give a pile a name and add a drawn card to the pile. If the pile didn't exist before, it does now. After a card has been drawn from the deck it can be moved from pile to pile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants