Skip to content

Add openBoosterPack#250

Merged
DoctorMcKay merged 1 commit intoDoctorMcKay:masterfrom
itsjfx:open-booster-pack-patch
May 29, 2020
Merged

Add openBoosterPack#250
DoctorMcKay merged 1 commit intoDoctorMcKay:masterfrom
itsjfx:open-booster-pack-patch

Conversation

@itsjfx
Copy link
Copy Markdown
Contributor

@itsjfx itsjfx commented May 23, 2020

Add openBoosterPack - implemented in the same way as getGemValue and turnItemIntoGems.

Errors just like getGemValue and turnItemIntoGems by checking the success state, if successful Steam responds with an array with info on the opened cards in this format - this response is the response callback for the function:

[
	{
		image: 'https://steamcommunity-a.akamaihd.net/economy/image/IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEfSMJ6dESN8p_2SVTY7V2NoNxXEKmChCIzb02ClYd_Z5K43PzQT8pL-LSiLyMGGXe3KPGgo6ROdZY2HY-mCi4u3FQ2rMQ-4rFlwBK6BX9mFLI4nXaARvi8VfrneHnkl8GRN1J8ERJwnjmHFANO10zSARJpJUnHfydJ2PjFxmbhJpXr-yV7rDbNP3wTFkA01xWa0bIIswqRk',
		name: 'Ursus',
		series: 1,
		foil: false
	},
	{
		image: 'https://steamcommunity-a.akamaihd.net/economy/image/IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEfSMJ6dESN8p_2SVTY7V2NoNxXEKmChCIzb02ClDYPxhOdmAyQj6pufQTXWmPzaSfHCPH1o4S7FaYWvZ_zWk4-vGQm6dE-l-EQEEdPBXp2dPNNfJYUUrhthJr2CqqE1wHxEtL5BCJ1i9kiYWYrh1mSQTJshbnyGjJMbQ01ZhbEA-WbzgA73EboL3wn46HUQwCeYXZQ7oK0XY',
		name: 'Neymar',
		series: 1,
		foil: false
	},
	{
		image: 'https://steamcommunity-a.akamaihd.net/economy/image/IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEfSMJ6dESN8p_2SVTY7V2NoNxXEKmChCIzb02ClDYPxhOdmAyQj6pufQTXWmPzaSfHCPH1o4S7FaYWvZ_zWk4-vGQm6dE-l-EQEEdPBXp2dPNNfJYUUrhthJr2CqqE1wHxEtL5BCJ1i9kiYWYrh1mSQTJshbnyGjJMbQ01ZhbEA-WbzgA73EboL3wn46HUQwCeYXZQ7oK0XY',
		name: 'Neymar',
		series: 1,
		foil: false
	}
]

The doc would read something like this:

openBoosterPack(appid, assetid, callback)

  • appid - The AppID of the game to which the booster pack in question belongs
  • assetid - The AssetID of the booster pack in question
  • callback - A function to be called when the request completes
    • err - An Error object on failure, or null on success
    • res - An array containing information on the opened cards.

v or later is required to use this method

Open a booster pack.

@itsjfx
Copy link
Copy Markdown
Contributor Author

itsjfx commented May 23, 2020

Also a solution for this issue: #247

@DoctorMcKay
Copy link
Copy Markdown
Owner

👍 Thanks a bunch

@DoctorMcKay DoctorMcKay merged commit f0a3cb2 into DoctorMcKay:master May 29, 2020
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

Successfully merging this pull request may close these issues.

2 participants