internal AdPostingApiClient(Uri adPostingUri, IOAuth2TokenClient tokenClient)
 {
     this._ensureIndexResourceInitialised = new Lazy <Task>(() => this.InitialiseIndexResource(adPostingUri), LazyThreadSafetyMode.ExecutionAndPublication);
     this._tokenClient = tokenClient;
     this._client      = new Hal.Client(new HttpClient(new AdPostingApiMessageHandler(new OAuthMessageHandler(tokenClient))));
 }
Exemple #2
0
 protected internal virtual async Task <IndexResource> GetIndexResourceAsync(Uri adPostingUri, Hal.Client halClient)
 {
     return(await halClient.GetResourceAsync <IndexResource, AdvertisementErrorResponse>(adPostingUri));
 }