Group API: Harmonize result object for 'list' and 'get details' objects

I was just trying out the Groups API and sumbled across a small glitch. LIke the other get-catalog calls, there's are "list resources" and "get resouce details" calls. With something like a DataSet, the "list" object is small and the "details" object is big. In the case of the Group API, the objects have four elements each. Between them, they have five elements. Here's a stripped down comparison:

 

List groups:

{
"id": 2079369920,
"name": "Groupy McGroupface",
"memberCount": 2,
"default": false
}

 

Retrieve group:

{
"id": 2079369920,
"name": "Groupy McGroupface",
"memberCount": 2,
"active": true
}

 Given there is so little data required here, it would be nice (and not costly) to combine the elements and return an identical object with either type of request:

 

Combined:

{
"id": 2079369920,
"name": "Groupy McGroupface",
"memberCount": 2,
"default": false,
"active": true
}

 I ask because what I like to do is pull down the list, iterate through pulling down the details, and save the unparsed details in a record. Then I can keep the parser code entirely distinct from the fetching code. This is handy for distributing the work and, more to the point, testing out and working on my parsers without constantly having to do a fresh pull. So, it's more convenient when the "details" version of the information includes all of the details. In this case, the default tag is all that's missing from the details result.

 

Thanks.

0
0 votes

· Last Updated

Comments

  • It looks like detail also returns creatorId. A simpler version of my request is simply to add "default" to the details response. For now, I'm injecting it by hand before storing.

This discussion has been closed.