AT&T API Platform SDK for Microsoft®  2.3.3
Wrapper classes that allow developers to build robust applications using .NET
 All Classes Namespaces Functions Enumerations Properties
Advertisement Service Cookbook

Overview

This cookbook shows you how to develop an Advertisement Service application using the Platform SDK for Microsoft.
The Platform SDK for Microsoft provides the following method:

  • Get Advertisement

To use these methods in an application, perform the following steps:

  1. Add a reference to the SDK as shown in the About the Cookbooks section and import the ATT_MSSDK.Advertisementv1 namespace.
  2. Create an instance of RequestFactory with the scope type RequestFactory.ScopeTypes.ADS, as shown in the About the Cookbooks section.
  3. Invoke the Adevertisement Service method using the RequestFactory instance.

Getting Ads

To get ads, invoke the GetAdvertisement method using the RequestFactory instance, as shown in the following code example. This method gets the advertisement details by passing an AdRequest object that encapsulates the Advertisement profile.

 AdRequest adRequest = new AdRequest();
 //UDID is used for Ad tracking purpose.
 adRequest.Uddi = "xxx-xxx-xx-xxxxxxxxxxxxxxxx-xxx"; 
 //category for the advertisement.
 adRequest.Category = "video";
 AdResponse adResponse = this.requestFactory.GetAdvertisement(adRequest);