We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I try to add drawn cards from the deck to one pile, it only stores when I pass repeated cards, in any other ocasion, it does not add to the pile!
Here is my code:
jogadores = ['Rodrigo'] baralho = requests.get( "https://deckofcardsapi.com/api/deck/new/shuffle/?deck_count=2").json() id_baralho = baralho['deck_id'] for jogador in jogadores: response_cartas = requests.get(f"https://deckofcardsapi.com/api/deck/{id_baralho}/draw/?count=11").json() cartas = [carta['code'] for carta in response_cartas['cards']] cartas_juntas = ','.join(cartas) url =f"https://deckofcardsapi.com/api/deck/{id_baralho}/pile/{jogador}/add/" response_pilha = requests.post(url, data={"cards": cartas_juntas}).json() print(response_pilha) pilha_rodrigo = requests.get(f"https://deckofcardsapi.com/api/deck/{id_baralho}/pile/{'Rodrigo'}/list/").json() print(pilha_rodrigo)`
I basically create a deck, draw eleven cards, get each one's code, and add to a new pile, in this case named Rodrigo.
Here is my debug session, where it only added the 6C cards:
Already tried adding with the GET route, same issue.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I try to add drawn cards from the deck to one pile, it only stores when I pass repeated cards, in any other ocasion, it does not add to the pile!
Here is my code:
I basically create a deck, draw eleven cards, get each one's code, and add to a new pile, in this case named Rodrigo.
Here is my debug session, where it only added the 6C cards:
Already tried adding with the GET route, same issue.
The text was updated successfully, but these errors were encountered: