Sign In Register

How can we help you today?

Start a new topic
Answered

Editing virtual goods

Hi, I'm creating virtual goods. I'd like to make the creation process a bit faster.

Is there any way to "clone an existing object", or to edit the existing collection of virtual goods in a more raw format (e.g. editing the whole json description of the virtual goods table at once)?


As it is now it is a bit painfull to create the virtual goods one by one.


Thank you !

Stephane


Best Answer

Hi Stephane,


You could do this using the game REST API, you can read more about it here. Basically you'd need to GET the game config as detailed in the linked documentation, add your new Virtual Goods json objects into the Virtual Goods array, then POST the full configuration back to GameSparks, this should speed things up for you. If you have any further questions just let me know.


Thanks,

Liam


Answer

Hi Stephane,


You could do this using the game REST API, you can read more about it here. Basically you'd need to GET the game config as detailed in the linked documentation, add your new Virtual Goods json objects into the Virtual Goods array, then POST the full configuration back to GameSparks, this should speed things up for you. If you have any further questions just let me know.


Thanks,

Liam

Hi Liam, 

Ok, thank you for the link. I'm trying to do that now from a get/post extension for chrome... Able to get the config, the post part I still have some issue (connection being timedout and now response from the server).

Would their be any way to create my own custom virtual good editor using dynamic forms, from within the platform?

Hi Stephane,


What are you using to get and post ? I use a chrome app called Postman to do this, it's quite simple to use, I can talk you through how to get and post your config with Postman if you'd like. I'll have to look into if it it's possible to create them in the manage screen, although you would essentially be creating another Virtual Good page which would take the same amount of time to add goods in manually.


Thanks,

Liam

Hi Liam,


Thank you for the suggestion about using Postman, it is much better than the extension I was using before and the post is now working seamlessly.

My main concern is just that for editing the goods you need to open each one separately, which pops up a windows and is quite painfull if you want to edit a large number of goods. I would imagine some grid based editing which would make it faster.


Editing the raw json will already solve my issue for the time being ! Thanks ! :-)

By the way, I noticed there is an "image" field in the virtual good but I did not find any related documentation. 

Is it possible to store a sprite/url for the virtualgoods ?

More generally it seems I could actually using this post/get for the config, I could edit the json to add whatever fields I want (although that is probably not the intented use), am I right?

Hi Stephane,

the image field is a remnant of our old config and can be ignored. 


I would advise against editing your own fields into the JSON of the various objects returned in the config. This would cause unexpected behavior, and most likely errors when posting. 


Hope this helps.

Best Regards, Patrick. 

Login to post a comment