Skip to main content

Class GvlClient

Provides functionality to fetch the GVL from the web.

Declaration
public class GvlClient

Fields

vendorListUrl

Declaration
protected const string vendorListUrl = "https://vendor-list.consensu.org/v2/vendor-list.json"

Methods

Fetch()

Fetches the GVL from the web.

Declaration
public VendorList Fetch()
Returns

Bidtellect.Tcf.Models.VendorList: A Global Vendor List object.### Fetch(string) fetches the GVL from the given URL.

Declaration
public VendorList Fetch(string url)
Returns

Bidtellect.Tcf.Models.VendorList: A Global Vendor List object.

Parameters
TypeNameDescription
System.StringurlThe URL from which to get the GVL JSON.

FetchJson(string)

Declaration
protected string FetchJson(string url)
Returns

System.String

Parameters
TypeName
System.Stringurl

ReadPurposeCollection(JObject)

Declaration
protected PurposeCollection ReadPurposeCollection(JObject purposes)
Returns

Bidtellect.Tcf.Models.Components.VendorList.PurposeCollection

Parameters
TypeName
Global.JObjectpurposes

ReadPurposeCollection(int[], PurposeCollection)

Declaration
protected PurposeCollection ReadPurposeCollection(int[] purposeIds, PurposeCollection lookup)
Returns

Bidtellect.Tcf.Models.Components.VendorList.PurposeCollection

Parameters
TypeName
System.Int32[]purposeIds
Bidtellect.Tcf.Models.Components.VendorList.PurposeCollectionlookup

ReadPurpose(JObject)

Declaration
protected Purpose ReadPurpose(JObject element)
Returns

Bidtellect.Tcf.Models.Components.VendorList.Purpose

Parameters
TypeName
Global.JObjectelement

ReadFeatureCollection(JObject)

Declaration
protected FeatureCollection ReadFeatureCollection(JObject features)
Returns

Bidtellect.Tcf.Models.Components.VendorList.FeatureCollection

Parameters
TypeName
Global.JObjectfeatures

ReadFeatureCollection(int[], FeatureCollection)

Declaration
protected FeatureCollection ReadFeatureCollection(int[] featureIds, FeatureCollection lookup)
Returns

Bidtellect.Tcf.Models.Components.VendorList.FeatureCollection

Parameters
TypeName
System.Int32[]featureIds
Bidtellect.Tcf.Models.Components.VendorList.FeatureCollectionlookup

ReadFeature(JObject)

Declaration
protected Feature ReadFeature(JObject element)
Returns

Bidtellect.Tcf.Models.Components.VendorList.Feature

Parameters
TypeName
Global.JObjectelement

ReadStackCollection(JObject, StackLookup)

Declaration
protected StackCollection ReadStackCollection(JObject stacks, GvlClient.StackLookup lookup)
Returns

Bidtellect.Tcf.Models.Components.VendorList.StackCollection

Parameters
TypeName
Global.JObjectstacks
Bidtellect.Tcf.GvlClient.StackLookuplookup

ReadStack(JObject, StackLookup)

Declaration
protected Stack ReadStack(JObject element, GvlClient.StackLookup lookup)
Returns

Bidtellect.Tcf.Models.Components.VendorList.Stack

Parameters
TypeName
Global.JObjectelement
Bidtellect.Tcf.GvlClient.StackLookuplookup

ReadVendorCollection(JObject, VendorLookup)

Declaration
protected VendorCollection ReadVendorCollection(JObject vendors, GvlClient.VendorLookup lookup)
Returns

Bidtellect.Tcf.Models.Components.VendorList.VendorCollection

Parameters
TypeName
Global.JObjectvendors
Bidtellect.Tcf.GvlClient.VendorLookuplookup

ReadVendor(JObject, VendorLookup)

Declaration
protected Vendor ReadVendor(JObject element, GvlClient.VendorLookup lookup)
Returns

Bidtellect.Tcf.Models.Components.VendorList.Vendor

Parameters
TypeName
Global.JObjectelement
Bidtellect.Tcf.GvlClient.VendorLookuplookup

ReadJsonBoolean(JObject, string, bool)

Declaration
protected bool ReadJsonBoolean(JObject element, string propertyName, bool defaultValue = false)
Returns

System.Boolean

Parameters
TypeName
Global.JObjectelement
System.StringpropertyName
System.BooleandefaultValue

ReadJsonNumber(JObject, string, int)

Declaration
protected int ReadJsonNumber(JObject element, string propertyName, int defaultValue = 0)
Returns

System.Int32

Parameters
TypeName
Global.JObjectelement
System.StringpropertyName
System.Int32defaultValue

ReadJsonString(JObject, string, string)

Declaration
protected string ReadJsonString(JObject element, string propertyName, string defaultValue = null)
Returns

System.String

Parameters
TypeName
Global.JObjectelement
System.StringpropertyName
System.StringdefaultValue

ReadJsonArray(JObject, string)

Declaration
protected JArray ReadJsonArray(JObject element, string propertyName)
Returns

Global.JArray

Parameters
TypeName
Global.JObjectelement
System.StringpropertyName

ReadIdArray(JObject, string)

Declaration
protected int[] ReadIdArray(JObject element, string propertyName)
Returns

System.Int32[]

Parameters
TypeName
Global.JObjectelement
System.StringpropertyName

ReadJsonObject(JObject, string)

Declaration
protected JObject ReadJsonObject(JObject element, string propertyName)
Returns

Global.JObject

Parameters
TypeName
Global.JObjectelement
System.StringpropertyName