InteractiveAdvertisingBureau / Global-Privacy-Platform

IAB Tech Lab Global Privacy Platform specification
72 stars 36 forks source link

Formatting of the getSection API command #71

Closed lamrowena closed 1 year ago

lamrowena commented 1 year ago

Addresses issue #47. Updated the output to be an array rather than an object and included example output.

janwinkler commented 1 year ago

Additional necessary change needed: getField "parameter" value descrition and example.

Proposal: ... parameter - string - API Prefix string + "." (dot) + [Section index* + "." (dot)] + fieldname return - ..... (stays as it is) ...

The section index is the index of a section within an segment, starting with 0 (zero) for the first section. The section index is optional, if not used, the first section is assumed.

For example, a client can ask the CMP to get the last updated field from the IAB TCF Canada v1.0 TCData.

var s = gpp('getField',null, "tcfca.LastUpdated"); or var s = gpp('getField',null, "tcfca.0.LastUpdated");

In order to get the Publisher Purposes Express Consent information from IAB TCF Canada the command would be used as: var s = __gpp('getField',null, "tcfca.1.PubPurposesExpressConsent");