View Source Gpp.Sections.Tcf (Gpp v0.1.2)

IAB Transparency and Consent Framework v1.1 & v2.0 String Decoding.

Only decodes the "version" and the "vendor consents" parts of the "core" segment.

Link to this section Summary

Functions

Checks if the provided vendor_id is in the list of vendor_consents

Link to this section Types

@type t() :: %Gpp.Sections.Tcf{
  section_id: term(),
  vendor_consents: [vendor_id()],
  version: pos_integer()
}
@type vendor_id() :: pos_integer()

Link to this section Functions

Link to this function

has_consent?(map, vendor_id)

View Source
@spec has_consent?(t(), vendor_id()) :: boolean()

Checks if the provided vendor_id is in the list of vendor_consents

examples

Examples

iex> Tcf.has_consent?(%Tcf{vendor_consents: [8, 6, 2]}, 8)
true

iex> Tcf.has_consent?(%Tcf{vendor_consents: [8, 6, 2]}, 123)
false