Insert virtual good through cloud code and dynamic forms
M
Marco Castorina
started a topic
over 4 years ago
Hello everyone,
we'd like to make our designer and other team members life easier by being able to upload a list of virtual goods into GameSparks by processing a file uploaded through dynamic forms using cloud code. So far the only hint I could find in the docs is in the REST api, by making a post request to this entry point: /restv2/game/{apiKey}/config/~virtualGoods
I tried to to use SparkHttp to submit data to the API but I keep getting a "NO_RESPONSE" reply. Here's the code I am using:
Assume that item.short_code contains the correct code (I double checked the snippet and item is correctly populated)
It's also quite cumbersome that I would have to submit all fields when the bulk of the entry data might be simply the short code and maybe price. The rest can be filled in later.
Any thoughts or suggestions? Is there a Cloud Code api call that I missed?
Cheers!
Marco
Best Answer
C
Customer Support
said
over 4 years ago
Hi Marco,
No there is no Cloud Code API for creating Virtual Goods, you don't have to supply all of the fields when creating them though. The minimum that can be supplied is the name, description, shortCode and type I believe, you should be able to create a Virtual Good with just those fields supplied leaving you to edit the rest later. I hope that helps, if you have any further questions just let me know.
Thanks,
Liam
1 Comment
Customer Support
said
over 4 years ago
Answer
Hi Marco,
No there is no Cloud Code API for creating Virtual Goods, you don't have to supply all of the fields when creating them though. The minimum that can be supplied is the name, description, shortCode and type I believe, you should be able to create a Virtual Good with just those fields supplied leaving you to edit the rest later. I hope that helps, if you have any further questions just let me know.
Marco Castorina
Hello everyone,
we'd like to make our designer and other team members life easier by being able to upload a list of virtual goods into GameSparks by processing a file uploaded through dynamic forms using cloud code. So far the only hint I could find in the docs is in the REST api, by making a post request to this entry point: /restv2/game/{apiKey}/config/~virtualGoods
I tried to to use SparkHttp to submit data to the API but I keep getting a "NO_RESPONSE" reply. Here's the code I am using:
Assume that item.short_code contains the correct code (I double checked the snippet and item is correctly populated)
It's also quite cumbersome that I would have to submit all fields when the bulk of the entry data might be simply the short code and maybe price. The rest can be filled in later.
Any thoughts or suggestions? Is there a Cloud Code api call that I missed?
Cheers!
Marco
Hi Marco,
No there is no Cloud Code API for creating Virtual Goods, you don't have to supply all of the fields when creating them though. The minimum that can be supplied is the name, description, shortCode and type I believe, you should be able to create a Virtual Good with just those fields supplied leaving you to edit the rest later. I hope that helps, if you have any further questions just let me know.
Thanks,
Liam
Customer Support
Hi Marco,
No there is no Cloud Code API for creating Virtual Goods, you don't have to supply all of the fields when creating them though. The minimum that can be supplied is the name, description, shortCode and type I believe, you should be able to create a Virtual Good with just those fields supplied leaving you to edit the rest later. I hope that helps, if you have any further questions just let me know.
Thanks,
Liam
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2485 topics