/// <summary> /// Retrieve the list of saved columns for a specified advertiser. /// Documentation https://developers.google.com/doubleclicksearch/v2/reference/savedColumns/list /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated Doubleclicksearch service.</param> /// <param name="agencyId">DS ID of the agency.</param> /// <param name="advertiserId">DS ID of the advertiser.</param> /// <returns>SavedColumnListResponse</returns> public static SavedColumnList List(DoubleclicksearchService service, string agencyId, string advertiserId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (agencyId == null) { throw new ArgumentNullException(agencyId); } if (advertiserId == null) { throw new ArgumentNullException(advertiserId); } // Make the request. return(service.SavedColumns.List(agencyId, advertiserId).Execute()); } catch (Exception ex) { throw new Exception("Request SavedColumns.List failed.", ex); } }
/// <summary> /// Downloads a report file encoded in UTF-8. /// Documentation https://developers.google.com/doubleclicksearch/v2/reference/reports/getFile /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated Doubleclicksearch service.</param> /// <param name="reportId">ID of the report.</param> /// <param name="reportFragment">The index of the report fragment to download.</param> public static void GetFile(DoubleclicksearchService service, string reportId, int?reportFragment) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (reportId == null) { throw new ArgumentNullException(reportId); } if (reportFragment == null) { throw new ArgumentNullException(reportFragment); } // Make the request. service.Reports.GetFile(reportId, reportFragment).Execute(); } catch (Exception ex) { throw new Exception("Request Reports.GetFile failed.", ex); } }
/// <summary> /// Retrieves a list of conversions from a DoubleClick Search engine account. /// Documentation https://developers.google.com/doubleclicksearch/v2/reference/conversion/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated Doubleclicksearch service.</param> /// <param name="agencyId">Numeric ID of the agency.</param> /// <param name="advertiserId">Numeric ID of the advertiser.</param> /// <param name="engineAccountId">Numeric ID of the engine account.</param> /// <param name="endDate">Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd.</param> /// <param name="rowCount">The number of conversions to return per call.</param> /// <param name="startDate">First date (inclusive) on which to retrieve conversions. Format is yyyymmdd.</param> /// <param name="startRow">The 0-based starting index for retrieving conversions results.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>ConversionListResponse</returns> public static ConversionList Get(DoubleclicksearchService service, string agencyId, string advertiserId, string engineAccountId, int?endDate, int?rowCount, int?startDate, int?startRow, ConversionGetOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (agencyId == null) { throw new ArgumentNullException(agencyId); } if (advertiserId == null) { throw new ArgumentNullException(advertiserId); } if (engineAccountId == null) { throw new ArgumentNullException(engineAccountId); } if (endDate == null) { throw new ArgumentNullException(endDate); } if (rowCount == null) { throw new ArgumentNullException(rowCount); } if (startDate == null) { throw new ArgumentNullException(startDate); } if (startRow == null) { throw new ArgumentNullException(startRow); } // Building the initial request. var request = service.Conversion.Get(agencyId, advertiserId, engineAccountId, endDate, rowCount, startDate, startRow); // Applying optional parameters to the request. request = (ConversionResource.GetRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Conversion.Get failed.", ex); } }
/// <summary> /// Updates a batch of conversions in DoubleClick Search. This method supports patch semantics. /// Documentation https://developers.google.com/doubleclicksearch/v2/reference/conversion/patch /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated Doubleclicksearch service.</param> /// <param name="advertiserId">Numeric ID of the advertiser.</param> /// <param name="agencyId">Numeric ID of the agency.</param> /// <param name="endDate">Last date (inclusive) on which to retrieve conversions. Format is yyyymmdd.</param> /// <param name="engineAccountId">Numeric ID of the engine account.</param> /// <param name="rowCount">The number of conversions to return per call.</param> /// <param name="startDate">First date (inclusive) on which to retrieve conversions. Format is yyyymmdd.</param> /// <param name="startRow">The 0-based starting index for retrieving conversions results.</param> /// <param name="body">A valid Doubleclicksearch v2 body.</param> /// <returns>ConversionListResponse</returns> public static ConversionList Patch(DoubleclicksearchService service, string advertiserId, string agencyId, int?endDate, string engineAccountId, int?rowCount, int?startDate, int?startRow, ConversionList body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (advertiserId == null) { throw new ArgumentNullException(advertiserId); } if (agencyId == null) { throw new ArgumentNullException(agencyId); } if (endDate == null) { throw new ArgumentNullException(endDate); } if (engineAccountId == null) { throw new ArgumentNullException(engineAccountId); } if (rowCount == null) { throw new ArgumentNullException(rowCount); } if (startDate == null) { throw new ArgumentNullException(startDate); } if (startRow == null) { throw new ArgumentNullException(startRow); } // Make the request. return(service.Conversion.Patch(body, advertiserId, agencyId, endDate, engineAccountId, rowCount, startDate, startRow).Execute()); } catch (Exception ex) { throw new Exception("Request Conversion.Patch failed.", ex); } }
/// <summary> /// Updates the availabilities of a batch of floodlight activities in DoubleClick Search. /// Documentation https://developers.google.com/doubleclicksearch/v2/reference/conversion/updateAvailability /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated Doubleclicksearch service.</param> /// <param name="body">A valid Doubleclicksearch v2 body.</param> /// <returns>UpdateAvailabilityResponseResponse</returns> public static UpdateAvailabilityResponse UpdateAvailability(DoubleclicksearchService service, UpdateAvailabilityRequest body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } // Make the request. return(service.Conversion.UpdateAvailability(body).Execute()); } catch (Exception ex) { throw new Exception("Request Conversion.UpdateAvailability failed.", ex); } }
/// <summary> /// Inserts a batch of new conversions into DoubleClick Search. /// Documentation https://developers.google.com/doubleclicksearch/v2/reference/conversion/insert /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated Doubleclicksearch service.</param> /// <param name="body">A valid Doubleclicksearch v2 body.</param> /// <returns>ConversionListResponse</returns> public static ConversionList Insert(DoubleclicksearchService service, ConversionList body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } // Make the request. return(service.Conversion.Insert(body).Execute()); } catch (Exception ex) { throw new Exception("Request Conversion.Insert failed.", ex); } }
/// <summary> /// Polls for the status of a report request. /// Documentation https://developers.google.com/doubleclicksearch/v2/reference/reports/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated Doubleclicksearch service.</param> /// <param name="reportId">ID of the report request being polled.</param> /// <returns>ReportResponse</returns> public static Report Get(DoubleclicksearchService service, string reportId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (reportId == null) { throw new ArgumentNullException(reportId); } // Make the request. return(service.Reports.Get(reportId).Execute()); } catch (Exception ex) { throw new Exception("Request Reports.Get failed.", ex); } }
/// <summary> /// Generates and returns a report immediately. /// Documentation https://developers.google.com/doubleclicksearch/v2/reference/reports/generate /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated Doubleclicksearch service.</param> /// <param name="body">A valid Doubleclicksearch v2 body.</param> /// <returns>ReportResponse</returns> public static Report Generate(DoubleclicksearchService service, ReportRequest body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } // Make the request. return(service.Reports.Generate(body).Execute()); } catch (Exception ex) { throw new Exception("Request Reports.Generate failed.", ex); } }