question

brendan avatar image
brendan asked

GetSharedGroupData, Keys = empty array

johntube
started a topic on Fri, 29 May 2015 at 2:12 PM

From the docs :

"if not specified, all keys will be returned, while an empty array indicates that no keys should be returned"

If by 'not specified' you mean : undefined, null, type is other than array.

This is working.

But if 'empty' is supposed to be :

  • 'Keys':[]

  • or if in script : myArray.length = 0; 'Keys':myArray

This does not work. What does works in this situation is an array of keys that does not exist in the SharedGroup.

One more thing :

there is also an undocumented error that could be returned with any API call that includes JSON data : (1071)

{
    "code": 400,
    "status": "BadRequest",
    "error": "InvalidRequest",
    "errorCode": 1071,
    "errorMessage": "Invalid JSON in request",
    "errorHash": "cc118bdd485392c609e693b5213a8a58",
    "errorDetails": {
        "ValidationError": [
            "Invalid JSON primitive: ."
        ]
    }
}
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

3 Comments
Brendan Vanous said on Sat, 30 May 2015 at 9:42 PM

Thanks, Hamza - since an empty string evaluates as null (the same as it does if the Keys parameter is left out), the best thing to do will be to update the docs to correct that. Specifying an empty string ("") or any Keys which don't exist in the Shared Group Data would work that way though, yes. And I'll have a look at doing another pass to add error values - good call.

Brendan


johntube said on Wed, 03 June 2015 at 3:00 PM

Hi Brendan,

Can you please also update GetTitleData so that its Keys field works the same as with GetSharedData ? Thanks.

HL


Brendan Vanous said on Wed, 03 June 2015 at 5:53 PM

Hi Hamza,

The thinking on Title Data was originally that games would have a well-defined set of data that any particular release uses, making this unnecessary. That said, we've discussed this internally, and making the calls act the same in this regard does seem like the right thing to do. I'll add this to the backlog, and update here when we've updated for this.

Brendan

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.