| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 1 library googleapis.doubleclicksearch.v2; | 3 library googleapis.doubleclicksearch.v2; |
| 2 | 4 |
| 3 import "dart:core" as core; | 5 import 'dart:core' as core; |
| 4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
| 5 import "dart:async" as async; | 7 import 'dart:async' as async; |
| 6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
| 7 | 9 |
| 8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
| 9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; | |
| 11 import '../common/common.dart' as common; | |
| 12 | 13 |
| 13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, |
| 16 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, |
| 17 ByteRange; |
| 18 |
| 19 const core.String USER_AGENT = 'dart-api-client doubleclicksearch/v2'; |
| 15 | 20 |
| 16 /** | 21 /** |
| 17 * Report and modify your advertising data in DoubleClick Search (for example, | 22 * Report and modify your advertising data in DoubleClick Search (for example, |
| 18 * campaigns, ad groups, keywords, and conversions). | 23 * campaigns, ad groups, keywords, and conversions). |
| 19 */ | 24 */ |
| 20 class DoubleclicksearchApi { | 25 class DoubleclicksearchApi { |
| 21 /** View and manage your advertising data in DoubleClick Search */ | 26 /** View and manage your advertising data in DoubleClick Search */ |
| 22 static const DoubleclicksearchScope = "https://www.googleapis.com/auth/doublec
licksearch"; | 27 static const DoubleclicksearchScope = "https://www.googleapis.com/auth/doublec
licksearch"; |
| 23 | 28 |
| 24 | 29 |
| 25 final common_internal.ApiRequester _requester; | 30 final commons.ApiRequester _requester; |
| 26 | 31 |
| 27 ConversionResourceApi get conversion => new ConversionResourceApi(_requester); | 32 ConversionResourceApi get conversion => new ConversionResourceApi(_requester); |
| 28 ReportsResourceApi get reports => new ReportsResourceApi(_requester); | 33 ReportsResourceApi get reports => new ReportsResourceApi(_requester); |
| 29 SavedColumnsResourceApi get savedColumns => new SavedColumnsResourceApi(_reque
ster); | 34 SavedColumnsResourceApi get savedColumns => new SavedColumnsResourceApi(_reque
ster); |
| 30 | 35 |
| 31 DoubleclicksearchApi(http.Client client, {core.String rootUrl: "https://www.go
ogleapis.com/", core.String servicePath: "doubleclicksearch/v2/"}) : | 36 DoubleclicksearchApi(http.Client client, {core.String rootUrl: "https://www.go
ogleapis.com/", core.String servicePath: "doubleclicksearch/v2/"}) : |
| 32 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 37 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 33 } | 38 } |
| 34 | 39 |
| 35 | 40 |
| 36 /** Not documented yet. */ | |
| 37 class ConversionResourceApi { | 41 class ConversionResourceApi { |
| 38 final common_internal.ApiRequester _requester; | 42 final commons.ApiRequester _requester; |
| 39 | 43 |
| 40 ConversionResourceApi(common_internal.ApiRequester client) : | 44 ConversionResourceApi(commons.ApiRequester client) : |
| 41 _requester = client; | 45 _requester = client; |
| 42 | 46 |
| 43 /** | 47 /** |
| 44 * Retrieves a list of conversions from a DoubleClick Search engine account. | 48 * Retrieves a list of conversions from a DoubleClick Search engine account. |
| 45 * | 49 * |
| 46 * Request parameters: | 50 * Request parameters: |
| 47 * | 51 * |
| 48 * [agencyId] - Numeric ID of the agency. | 52 * [agencyId] - Numeric ID of the agency. |
| 49 * | 53 * |
| 50 * [advertiserId] - Numeric ID of the advertiser. | 54 * [advertiserId] - Numeric ID of the advertiser. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 67 * [adGroupId] - Numeric ID of the ad group. | 71 * [adGroupId] - Numeric ID of the ad group. |
| 68 * | 72 * |
| 69 * [adId] - Numeric ID of the ad. | 73 * [adId] - Numeric ID of the ad. |
| 70 * | 74 * |
| 71 * [campaignId] - Numeric ID of the campaign. | 75 * [campaignId] - Numeric ID of the campaign. |
| 72 * | 76 * |
| 73 * [criterionId] - Numeric ID of the criterion. | 77 * [criterionId] - Numeric ID of the criterion. |
| 74 * | 78 * |
| 75 * Completes with a [ConversionList]. | 79 * Completes with a [ConversionList]. |
| 76 * | 80 * |
| 77 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 81 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 78 * error. | 82 * error. |
| 79 * | 83 * |
| 80 * If the used [http.Client] completes with an error when making a REST call, | 84 * If the used [http.Client] completes with an error when making a REST call, |
| 81 * this method will complete with the same error. | 85 * this method will complete with the same error. |
| 82 */ | 86 */ |
| 83 async.Future<ConversionList> get(core.String agencyId, core.String advertiserI
d, core.String engineAccountId, core.int endDate, core.int rowCount, core.int st
artDate, core.int startRow, {core.String adGroupId, core.String adId, core.Strin
g campaignId, core.String criterionId}) { | 87 async.Future<ConversionList> get(core.String agencyId, core.String advertiserI
d, core.String engineAccountId, core.int endDate, core.int rowCount, core.int st
artDate, core.int startRow, {core.String adGroupId, core.String adId, core.Strin
g campaignId, core.String criterionId}) { |
| 84 var _url = null; | 88 var _url = null; |
| 85 var _queryParams = new core.Map(); | 89 var _queryParams = new core.Map(); |
| 86 var _uploadMedia = null; | 90 var _uploadMedia = null; |
| 87 var _uploadOptions = null; | 91 var _uploadOptions = null; |
| 88 var _downloadOptions = common.DownloadOptions.Metadata; | 92 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 89 var _body = null; | 93 var _body = null; |
| 90 | 94 |
| 91 if (agencyId == null) { | 95 if (agencyId == null) { |
| 92 throw new core.ArgumentError("Parameter agencyId is required."); | 96 throw new core.ArgumentError("Parameter agencyId is required."); |
| 93 } | 97 } |
| 94 if (advertiserId == null) { | 98 if (advertiserId == null) { |
| 95 throw new core.ArgumentError("Parameter advertiserId is required."); | 99 throw new core.ArgumentError("Parameter advertiserId is required."); |
| 96 } | 100 } |
| 97 if (engineAccountId == null) { | 101 if (engineAccountId == null) { |
| 98 throw new core.ArgumentError("Parameter engineAccountId is required."); | 102 throw new core.ArgumentError("Parameter engineAccountId is required."); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 120 _queryParams["adId"] = [adId]; | 124 _queryParams["adId"] = [adId]; |
| 121 } | 125 } |
| 122 if (campaignId != null) { | 126 if (campaignId != null) { |
| 123 _queryParams["campaignId"] = [campaignId]; | 127 _queryParams["campaignId"] = [campaignId]; |
| 124 } | 128 } |
| 125 if (criterionId != null) { | 129 if (criterionId != null) { |
| 126 _queryParams["criterionId"] = [criterionId]; | 130 _queryParams["criterionId"] = [criterionId]; |
| 127 } | 131 } |
| 128 | 132 |
| 129 | 133 |
| 130 _url = 'agency/' + common_internal.Escaper.ecapeVariable('$agencyId') + '/ad
vertiser/' + common_internal.Escaper.ecapeVariable('$advertiserId') + '/engine/'
+ common_internal.Escaper.ecapeVariable('$engineAccountId') + '/conversion'; | 134 _url = 'agency/' + commons.Escaper.ecapeVariable('$agencyId') + '/advertiser
/' + commons.Escaper.ecapeVariable('$advertiserId') + '/engine/' + commons.Escap
er.ecapeVariable('$engineAccountId') + '/conversion'; |
| 131 | 135 |
| 132 var _response = _requester.request(_url, | 136 var _response = _requester.request(_url, |
| 133 "GET", | 137 "GET", |
| 134 body: _body, | 138 body: _body, |
| 135 queryParams: _queryParams, | 139 queryParams: _queryParams, |
| 136 uploadOptions: _uploadOptions, | 140 uploadOptions: _uploadOptions, |
| 137 uploadMedia: _uploadMedia, | 141 uploadMedia: _uploadMedia, |
| 138 downloadOptions: _downloadOptions); | 142 downloadOptions: _downloadOptions); |
| 139 return _response.then((data) => new ConversionList.fromJson(data)); | 143 return _response.then((data) => new ConversionList.fromJson(data)); |
| 140 } | 144 } |
| 141 | 145 |
| 142 /** | 146 /** |
| 143 * Inserts a batch of new conversions into DoubleClick Search. | 147 * Inserts a batch of new conversions into DoubleClick Search. |
| 144 * | 148 * |
| 145 * [request] - The metadata request object. | 149 * [request] - The metadata request object. |
| 146 * | 150 * |
| 147 * Request parameters: | 151 * Request parameters: |
| 148 * | 152 * |
| 149 * Completes with a [ConversionList]. | 153 * Completes with a [ConversionList]. |
| 150 * | 154 * |
| 151 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 155 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 152 * error. | 156 * error. |
| 153 * | 157 * |
| 154 * If the used [http.Client] completes with an error when making a REST call, | 158 * If the used [http.Client] completes with an error when making a REST call, |
| 155 * this method will complete with the same error. | 159 * this method will complete with the same error. |
| 156 */ | 160 */ |
| 157 async.Future<ConversionList> insert(ConversionList request) { | 161 async.Future<ConversionList> insert(ConversionList request) { |
| 158 var _url = null; | 162 var _url = null; |
| 159 var _queryParams = new core.Map(); | 163 var _queryParams = new core.Map(); |
| 160 var _uploadMedia = null; | 164 var _uploadMedia = null; |
| 161 var _uploadOptions = null; | 165 var _uploadOptions = null; |
| 162 var _downloadOptions = common.DownloadOptions.Metadata; | 166 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 163 var _body = null; | 167 var _body = null; |
| 164 | 168 |
| 165 if (request != null) { | 169 if (request != null) { |
| 166 _body = convert.JSON.encode((request).toJson()); | 170 _body = convert.JSON.encode((request).toJson()); |
| 167 } | 171 } |
| 168 | 172 |
| 169 | 173 |
| 170 _url = 'conversion'; | 174 _url = 'conversion'; |
| 171 | 175 |
| 172 var _response = _requester.request(_url, | 176 var _response = _requester.request(_url, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 201 * Value must be between "1" and "1000". | 205 * Value must be between "1" and "1000". |
| 202 * | 206 * |
| 203 * [startDate] - First date (inclusive) on which to retrieve conversions. | 207 * [startDate] - First date (inclusive) on which to retrieve conversions. |
| 204 * Format is yyyymmdd. | 208 * Format is yyyymmdd. |
| 205 * Value must be between "20091101" and "99991231". | 209 * Value must be between "20091101" and "99991231". |
| 206 * | 210 * |
| 207 * [startRow] - The 0-based starting index for retrieving conversions results. | 211 * [startRow] - The 0-based starting index for retrieving conversions results. |
| 208 * | 212 * |
| 209 * Completes with a [ConversionList]. | 213 * Completes with a [ConversionList]. |
| 210 * | 214 * |
| 211 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 215 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 212 * error. | 216 * error. |
| 213 * | 217 * |
| 214 * If the used [http.Client] completes with an error when making a REST call, | 218 * If the used [http.Client] completes with an error when making a REST call, |
| 215 * this method will complete with the same error. | 219 * this method will complete with the same error. |
| 216 */ | 220 */ |
| 217 async.Future<ConversionList> patch(ConversionList request, core.String adverti
serId, core.String agencyId, core.int endDate, core.String engineAccountId, core
.int rowCount, core.int startDate, core.int startRow) { | 221 async.Future<ConversionList> patch(ConversionList request, core.String adverti
serId, core.String agencyId, core.int endDate, core.String engineAccountId, core
.int rowCount, core.int startDate, core.int startRow) { |
| 218 var _url = null; | 222 var _url = null; |
| 219 var _queryParams = new core.Map(); | 223 var _queryParams = new core.Map(); |
| 220 var _uploadMedia = null; | 224 var _uploadMedia = null; |
| 221 var _uploadOptions = null; | 225 var _uploadOptions = null; |
| 222 var _downloadOptions = common.DownloadOptions.Metadata; | 226 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 223 var _body = null; | 227 var _body = null; |
| 224 | 228 |
| 225 if (request != null) { | 229 if (request != null) { |
| 226 _body = convert.JSON.encode((request).toJson()); | 230 _body = convert.JSON.encode((request).toJson()); |
| 227 } | 231 } |
| 228 if (advertiserId == null) { | 232 if (advertiserId == null) { |
| 229 throw new core.ArgumentError("Parameter advertiserId is required."); | 233 throw new core.ArgumentError("Parameter advertiserId is required."); |
| 230 } | 234 } |
| 231 _queryParams["advertiserId"] = [advertiserId]; | 235 _queryParams["advertiserId"] = [advertiserId]; |
| 232 if (agencyId == null) { | 236 if (agencyId == null) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 273 |
| 270 /** | 274 /** |
| 271 * Updates a batch of conversions in DoubleClick Search. | 275 * Updates a batch of conversions in DoubleClick Search. |
| 272 * | 276 * |
| 273 * [request] - The metadata request object. | 277 * [request] - The metadata request object. |
| 274 * | 278 * |
| 275 * Request parameters: | 279 * Request parameters: |
| 276 * | 280 * |
| 277 * Completes with a [ConversionList]. | 281 * Completes with a [ConversionList]. |
| 278 * | 282 * |
| 279 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 283 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 280 * error. | 284 * error. |
| 281 * | 285 * |
| 282 * If the used [http.Client] completes with an error when making a REST call, | 286 * If the used [http.Client] completes with an error when making a REST call, |
| 283 * this method will complete with the same error. | 287 * this method will complete with the same error. |
| 284 */ | 288 */ |
| 285 async.Future<ConversionList> update(ConversionList request) { | 289 async.Future<ConversionList> update(ConversionList request) { |
| 286 var _url = null; | 290 var _url = null; |
| 287 var _queryParams = new core.Map(); | 291 var _queryParams = new core.Map(); |
| 288 var _uploadMedia = null; | 292 var _uploadMedia = null; |
| 289 var _uploadOptions = null; | 293 var _uploadOptions = null; |
| 290 var _downloadOptions = common.DownloadOptions.Metadata; | 294 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 291 var _body = null; | 295 var _body = null; |
| 292 | 296 |
| 293 if (request != null) { | 297 if (request != null) { |
| 294 _body = convert.JSON.encode((request).toJson()); | 298 _body = convert.JSON.encode((request).toJson()); |
| 295 } | 299 } |
| 296 | 300 |
| 297 | 301 |
| 298 _url = 'conversion'; | 302 _url = 'conversion'; |
| 299 | 303 |
| 300 var _response = _requester.request(_url, | 304 var _response = _requester.request(_url, |
| 301 "PUT", | 305 "PUT", |
| 302 body: _body, | 306 body: _body, |
| 303 queryParams: _queryParams, | 307 queryParams: _queryParams, |
| 304 uploadOptions: _uploadOptions, | 308 uploadOptions: _uploadOptions, |
| 305 uploadMedia: _uploadMedia, | 309 uploadMedia: _uploadMedia, |
| 306 downloadOptions: _downloadOptions); | 310 downloadOptions: _downloadOptions); |
| 307 return _response.then((data) => new ConversionList.fromJson(data)); | 311 return _response.then((data) => new ConversionList.fromJson(data)); |
| 308 } | 312 } |
| 309 | 313 |
| 310 /** | 314 /** |
| 311 * Updates the availabilities of a batch of floodlight activities in | 315 * Updates the availabilities of a batch of floodlight activities in |
| 312 * DoubleClick Search. | 316 * DoubleClick Search. |
| 313 * | 317 * |
| 314 * [request] - The metadata request object. | 318 * [request] - The metadata request object. |
| 315 * | 319 * |
| 316 * Request parameters: | 320 * Request parameters: |
| 317 * | 321 * |
| 318 * Completes with a [UpdateAvailabilityResponse]. | 322 * Completes with a [UpdateAvailabilityResponse]. |
| 319 * | 323 * |
| 320 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 324 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 321 * error. | 325 * error. |
| 322 * | 326 * |
| 323 * If the used [http.Client] completes with an error when making a REST call, | 327 * If the used [http.Client] completes with an error when making a REST call, |
| 324 * this method will complete with the same error. | 328 * this method will complete with the same error. |
| 325 */ | 329 */ |
| 326 async.Future<UpdateAvailabilityResponse> updateAvailability(UpdateAvailability
Request request) { | 330 async.Future<UpdateAvailabilityResponse> updateAvailability(UpdateAvailability
Request request) { |
| 327 var _url = null; | 331 var _url = null; |
| 328 var _queryParams = new core.Map(); | 332 var _queryParams = new core.Map(); |
| 329 var _uploadMedia = null; | 333 var _uploadMedia = null; |
| 330 var _uploadOptions = null; | 334 var _uploadOptions = null; |
| 331 var _downloadOptions = common.DownloadOptions.Metadata; | 335 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 332 var _body = null; | 336 var _body = null; |
| 333 | 337 |
| 334 if (request != null) { | 338 if (request != null) { |
| 335 _body = convert.JSON.encode((request).toJson()); | 339 _body = convert.JSON.encode((request).toJson()); |
| 336 } | 340 } |
| 337 | 341 |
| 338 | 342 |
| 339 _url = 'conversion/updateAvailability'; | 343 _url = 'conversion/updateAvailability'; |
| 340 | 344 |
| 341 var _response = _requester.request(_url, | 345 var _response = _requester.request(_url, |
| 342 "POST", | 346 "POST", |
| 343 body: _body, | 347 body: _body, |
| 344 queryParams: _queryParams, | 348 queryParams: _queryParams, |
| 345 uploadOptions: _uploadOptions, | 349 uploadOptions: _uploadOptions, |
| 346 uploadMedia: _uploadMedia, | 350 uploadMedia: _uploadMedia, |
| 347 downloadOptions: _downloadOptions); | 351 downloadOptions: _downloadOptions); |
| 348 return _response.then((data) => new UpdateAvailabilityResponse.fromJson(data
)); | 352 return _response.then((data) => new UpdateAvailabilityResponse.fromJson(data
)); |
| 349 } | 353 } |
| 350 | 354 |
| 351 } | 355 } |
| 352 | 356 |
| 353 | 357 |
| 354 /** Not documented yet. */ | |
| 355 class ReportsResourceApi { | 358 class ReportsResourceApi { |
| 356 final common_internal.ApiRequester _requester; | 359 final commons.ApiRequester _requester; |
| 357 | 360 |
| 358 ReportsResourceApi(common_internal.ApiRequester client) : | 361 ReportsResourceApi(commons.ApiRequester client) : |
| 359 _requester = client; | 362 _requester = client; |
| 360 | 363 |
| 361 /** | 364 /** |
| 362 * Generates and returns a report immediately. | 365 * Generates and returns a report immediately. |
| 363 * | 366 * |
| 364 * [request_1] - The metadata request object. | 367 * [request_1] - The metadata request object. |
| 365 * | 368 * |
| 366 * Request parameters: | 369 * Request parameters: |
| 367 * | 370 * |
| 368 * Completes with a [Report]. | 371 * Completes with a [Report]. |
| 369 * | 372 * |
| 370 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 373 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 371 * error. | 374 * error. |
| 372 * | 375 * |
| 373 * If the used [http.Client] completes with an error when making a REST call, | 376 * If the used [http.Client] completes with an error when making a REST call, |
| 374 * this method will complete with the same error. | 377 * this method will complete with the same error. |
| 375 */ | 378 */ |
| 376 async.Future<Report> generate(ReportRequest request_1) { | 379 async.Future<Report> generate(ReportRequest request_1) { |
| 377 var _url = null; | 380 var _url = null; |
| 378 var _queryParams = new core.Map(); | 381 var _queryParams = new core.Map(); |
| 379 var _uploadMedia = null; | 382 var _uploadMedia = null; |
| 380 var _uploadOptions = null; | 383 var _uploadOptions = null; |
| 381 var _downloadOptions = common.DownloadOptions.Metadata; | 384 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 382 var _body = null; | 385 var _body = null; |
| 383 | 386 |
| 384 if (request_1 != null) { | 387 if (request_1 != null) { |
| 385 _body = convert.JSON.encode((request_1).toJson()); | 388 _body = convert.JSON.encode((request_1).toJson()); |
| 386 } | 389 } |
| 387 | 390 |
| 388 | 391 |
| 389 _url = 'reports/generate'; | 392 _url = 'reports/generate'; |
| 390 | 393 |
| 391 var _response = _requester.request(_url, | 394 var _response = _requester.request(_url, |
| 392 "POST", | 395 "POST", |
| 393 body: _body, | 396 body: _body, |
| 394 queryParams: _queryParams, | 397 queryParams: _queryParams, |
| 395 uploadOptions: _uploadOptions, | 398 uploadOptions: _uploadOptions, |
| 396 uploadMedia: _uploadMedia, | 399 uploadMedia: _uploadMedia, |
| 397 downloadOptions: _downloadOptions); | 400 downloadOptions: _downloadOptions); |
| 398 return _response.then((data) => new Report.fromJson(data)); | 401 return _response.then((data) => new Report.fromJson(data)); |
| 399 } | 402 } |
| 400 | 403 |
| 401 /** | 404 /** |
| 402 * Polls for the status of a report request. | 405 * Polls for the status of a report request. |
| 403 * | 406 * |
| 404 * Request parameters: | 407 * Request parameters: |
| 405 * | 408 * |
| 406 * [reportId] - ID of the report request being polled. | 409 * [reportId] - ID of the report request being polled. |
| 407 * | 410 * |
| 408 * Completes with a [Report]. | 411 * Completes with a [Report]. |
| 409 * | 412 * |
| 410 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 413 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 411 * error. | 414 * error. |
| 412 * | 415 * |
| 413 * If the used [http.Client] completes with an error when making a REST call, | 416 * If the used [http.Client] completes with an error when making a REST call, |
| 414 * this method will complete with the same error. | 417 * this method will complete with the same error. |
| 415 */ | 418 */ |
| 416 async.Future<Report> get(core.String reportId) { | 419 async.Future<Report> get(core.String reportId) { |
| 417 var _url = null; | 420 var _url = null; |
| 418 var _queryParams = new core.Map(); | 421 var _queryParams = new core.Map(); |
| 419 var _uploadMedia = null; | 422 var _uploadMedia = null; |
| 420 var _uploadOptions = null; | 423 var _uploadOptions = null; |
| 421 var _downloadOptions = common.DownloadOptions.Metadata; | 424 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 422 var _body = null; | 425 var _body = null; |
| 423 | 426 |
| 424 if (reportId == null) { | 427 if (reportId == null) { |
| 425 throw new core.ArgumentError("Parameter reportId is required."); | 428 throw new core.ArgumentError("Parameter reportId is required."); |
| 426 } | 429 } |
| 427 | 430 |
| 428 | 431 |
| 429 _url = 'reports/' + common_internal.Escaper.ecapeVariable('$reportId'); | 432 _url = 'reports/' + commons.Escaper.ecapeVariable('$reportId'); |
| 430 | 433 |
| 431 var _response = _requester.request(_url, | 434 var _response = _requester.request(_url, |
| 432 "GET", | 435 "GET", |
| 433 body: _body, | 436 body: _body, |
| 434 queryParams: _queryParams, | 437 queryParams: _queryParams, |
| 435 uploadOptions: _uploadOptions, | 438 uploadOptions: _uploadOptions, |
| 436 uploadMedia: _uploadMedia, | 439 uploadMedia: _uploadMedia, |
| 437 downloadOptions: _downloadOptions); | 440 downloadOptions: _downloadOptions); |
| 438 return _response.then((data) => new Report.fromJson(data)); | 441 return _response.then((data) => new Report.fromJson(data)); |
| 439 } | 442 } |
| 440 | 443 |
| 441 /** | 444 /** |
| 442 * Downloads a report file. | 445 * Downloads a report file encoded in UTF-8. |
| 443 * | 446 * |
| 444 * Request parameters: | 447 * Request parameters: |
| 445 * | 448 * |
| 446 * [reportId] - ID of the report. | 449 * [reportId] - ID of the report. |
| 447 * | 450 * |
| 448 * [reportFragment] - The index of the report fragment to download. | 451 * [reportFragment] - The index of the report fragment to download. |
| 449 * | 452 * |
| 450 * [downloadOptions] - Options for downloading. A download can be either a | 453 * [downloadOptions] - Options for downloading. A download can be either a |
| 451 * Metadata (default) or Media download. Partial Media downloads are possible | 454 * Metadata (default) or Media download. Partial Media downloads are possible |
| 452 * as well. | 455 * as well. |
| 453 * | 456 * |
| 454 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 457 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 455 * error. | 458 * error. |
| 456 * | 459 * |
| 457 * If the used [http.Client] completes with an error when making a REST call, | 460 * If the used [http.Client] completes with an error when making a REST call, |
| 458 * this method will complete with the same error. | 461 * this method will complete with the same error. |
| 459 */ | 462 */ |
| 460 async.Future getFile(core.String reportId, core.int reportFragment, {common.Do
wnloadOptions downloadOptions: common.DownloadOptions.Metadata}) { | 463 async.Future getFile(core.String reportId, core.int reportFragment, {commons.D
ownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) { |
| 461 var _url = null; | 464 var _url = null; |
| 462 var _queryParams = new core.Map(); | 465 var _queryParams = new core.Map(); |
| 463 var _uploadMedia = null; | 466 var _uploadMedia = null; |
| 464 var _uploadOptions = null; | 467 var _uploadOptions = null; |
| 465 var _downloadOptions = common.DownloadOptions.Metadata; | 468 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 466 var _body = null; | 469 var _body = null; |
| 467 | 470 |
| 468 if (reportId == null) { | 471 if (reportId == null) { |
| 469 throw new core.ArgumentError("Parameter reportId is required."); | 472 throw new core.ArgumentError("Parameter reportId is required."); |
| 470 } | 473 } |
| 471 if (reportFragment == null) { | 474 if (reportFragment == null) { |
| 472 throw new core.ArgumentError("Parameter reportFragment is required."); | 475 throw new core.ArgumentError("Parameter reportFragment is required."); |
| 473 } | 476 } |
| 474 | 477 |
| 475 _downloadOptions = downloadOptions; | 478 _downloadOptions = downloadOptions; |
| 476 | 479 |
| 477 _url = 'reports/' + common_internal.Escaper.ecapeVariable('$reportId') + '/f
iles/' + common_internal.Escaper.ecapeVariable('$reportFragment'); | 480 _url = 'reports/' + commons.Escaper.ecapeVariable('$reportId') + '/files/' +
commons.Escaper.ecapeVariable('$reportFragment'); |
| 478 | 481 |
| 479 var _response = _requester.request(_url, | 482 var _response = _requester.request(_url, |
| 480 "GET", | 483 "GET", |
| 481 body: _body, | 484 body: _body, |
| 482 queryParams: _queryParams, | 485 queryParams: _queryParams, |
| 483 uploadOptions: _uploadOptions, | 486 uploadOptions: _uploadOptions, |
| 484 uploadMedia: _uploadMedia, | 487 uploadMedia: _uploadMedia, |
| 485 downloadOptions: _downloadOptions); | 488 downloadOptions: _downloadOptions); |
| 486 if (_downloadOptions == null || | 489 if (_downloadOptions == null || |
| 487 _downloadOptions == common.DownloadOptions.Metadata) { | 490 _downloadOptions == commons.DownloadOptions.Metadata) { |
| 488 return _response.then((data) => null); | 491 return _response.then((data) => null); |
| 489 } else { | 492 } else { |
| 490 return _response; | 493 return _response; |
| 491 } | 494 } |
| 492 } | 495 } |
| 493 | 496 |
| 494 /** | 497 /** |
| 495 * Inserts a report request into the reporting system. | 498 * Inserts a report request into the reporting system. |
| 496 * | 499 * |
| 497 * [request_1] - The metadata request object. | 500 * [request_1] - The metadata request object. |
| 498 * | 501 * |
| 499 * Request parameters: | 502 * Request parameters: |
| 500 * | 503 * |
| 501 * Completes with a [Report]. | 504 * Completes with a [Report]. |
| 502 * | 505 * |
| 503 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 506 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 504 * error. | 507 * error. |
| 505 * | 508 * |
| 506 * If the used [http.Client] completes with an error when making a REST call, | 509 * If the used [http.Client] completes with an error when making a REST call, |
| 507 * this method will complete with the same error. | 510 * this method will complete with the same error. |
| 508 */ | 511 */ |
| 509 async.Future<Report> request(ReportRequest request_1) { | 512 async.Future<Report> request(ReportRequest request_1) { |
| 510 var _url = null; | 513 var _url = null; |
| 511 var _queryParams = new core.Map(); | 514 var _queryParams = new core.Map(); |
| 512 var _uploadMedia = null; | 515 var _uploadMedia = null; |
| 513 var _uploadOptions = null; | 516 var _uploadOptions = null; |
| 514 var _downloadOptions = common.DownloadOptions.Metadata; | 517 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 515 var _body = null; | 518 var _body = null; |
| 516 | 519 |
| 517 if (request_1 != null) { | 520 if (request_1 != null) { |
| 518 _body = convert.JSON.encode((request_1).toJson()); | 521 _body = convert.JSON.encode((request_1).toJson()); |
| 519 } | 522 } |
| 520 | 523 |
| 521 | 524 |
| 522 _url = 'reports'; | 525 _url = 'reports'; |
| 523 | 526 |
| 524 var _response = _requester.request(_url, | 527 var _response = _requester.request(_url, |
| 525 "POST", | 528 "POST", |
| 526 body: _body, | 529 body: _body, |
| 527 queryParams: _queryParams, | 530 queryParams: _queryParams, |
| 528 uploadOptions: _uploadOptions, | 531 uploadOptions: _uploadOptions, |
| 529 uploadMedia: _uploadMedia, | 532 uploadMedia: _uploadMedia, |
| 530 downloadOptions: _downloadOptions); | 533 downloadOptions: _downloadOptions); |
| 531 return _response.then((data) => new Report.fromJson(data)); | 534 return _response.then((data) => new Report.fromJson(data)); |
| 532 } | 535 } |
| 533 | 536 |
| 534 } | 537 } |
| 535 | 538 |
| 536 | 539 |
| 537 /** Not documented yet. */ | |
| 538 class SavedColumnsResourceApi { | 540 class SavedColumnsResourceApi { |
| 539 final common_internal.ApiRequester _requester; | 541 final commons.ApiRequester _requester; |
| 540 | 542 |
| 541 SavedColumnsResourceApi(common_internal.ApiRequester client) : | 543 SavedColumnsResourceApi(commons.ApiRequester client) : |
| 542 _requester = client; | 544 _requester = client; |
| 543 | 545 |
| 544 /** | 546 /** |
| 545 * Retrieve the list of saved columns for a specified advertiser. | 547 * Retrieve the list of saved columns for a specified advertiser. |
| 546 * | 548 * |
| 547 * Request parameters: | 549 * Request parameters: |
| 548 * | 550 * |
| 549 * [agencyId] - DS ID of the agency. | 551 * [agencyId] - DS ID of the agency. |
| 550 * | 552 * |
| 551 * [advertiserId] - DS ID of the advertiser. | 553 * [advertiserId] - DS ID of the advertiser. |
| 552 * | 554 * |
| 553 * Completes with a [SavedColumnList]. | 555 * Completes with a [SavedColumnList]. |
| 554 * | 556 * |
| 555 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 557 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 556 * error. | 558 * error. |
| 557 * | 559 * |
| 558 * If the used [http.Client] completes with an error when making a REST call, | 560 * If the used [http.Client] completes with an error when making a REST call, |
| 559 * this method will complete with the same error. | 561 * this method will complete with the same error. |
| 560 */ | 562 */ |
| 561 async.Future<SavedColumnList> list(core.String agencyId, core.String advertise
rId) { | 563 async.Future<SavedColumnList> list(core.String agencyId, core.String advertise
rId) { |
| 562 var _url = null; | 564 var _url = null; |
| 563 var _queryParams = new core.Map(); | 565 var _queryParams = new core.Map(); |
| 564 var _uploadMedia = null; | 566 var _uploadMedia = null; |
| 565 var _uploadOptions = null; | 567 var _uploadOptions = null; |
| 566 var _downloadOptions = common.DownloadOptions.Metadata; | 568 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 567 var _body = null; | 569 var _body = null; |
| 568 | 570 |
| 569 if (agencyId == null) { | 571 if (agencyId == null) { |
| 570 throw new core.ArgumentError("Parameter agencyId is required."); | 572 throw new core.ArgumentError("Parameter agencyId is required."); |
| 571 } | 573 } |
| 572 if (advertiserId == null) { | 574 if (advertiserId == null) { |
| 573 throw new core.ArgumentError("Parameter advertiserId is required."); | 575 throw new core.ArgumentError("Parameter advertiserId is required."); |
| 574 } | 576 } |
| 575 | 577 |
| 576 | 578 |
| 577 _url = 'agency/' + common_internal.Escaper.ecapeVariable('$agencyId') + '/ad
vertiser/' + common_internal.Escaper.ecapeVariable('$advertiserId') + '/savedcol
umns'; | 579 _url = 'agency/' + commons.Escaper.ecapeVariable('$agencyId') + '/advertiser
/' + commons.Escaper.ecapeVariable('$advertiserId') + '/savedcolumns'; |
| 578 | 580 |
| 579 var _response = _requester.request(_url, | 581 var _response = _requester.request(_url, |
| 580 "GET", | 582 "GET", |
| 581 body: _body, | 583 body: _body, |
| 582 queryParams: _queryParams, | 584 queryParams: _queryParams, |
| 583 uploadOptions: _uploadOptions, | 585 uploadOptions: _uploadOptions, |
| 584 uploadMedia: _uploadMedia, | 586 uploadMedia: _uploadMedia, |
| 585 downloadOptions: _downloadOptions); | 587 downloadOptions: _downloadOptions); |
| 586 return _response.then((data) => new SavedColumnList.fromJson(data)); | 588 return _response.then((data) => new SavedColumnList.fromJson(data)); |
| 587 } | 589 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 679 |
| 678 /** DS ad ID. */ | 680 /** DS ad ID. */ |
| 679 core.String adId; | 681 core.String adId; |
| 680 | 682 |
| 681 /** DS advertiser ID. */ | 683 /** DS advertiser ID. */ |
| 682 core.String advertiserId; | 684 core.String advertiserId; |
| 683 | 685 |
| 684 /** DS agency ID. */ | 686 /** DS agency ID. */ |
| 685 core.String agencyId; | 687 core.String agencyId; |
| 686 | 688 |
| 687 /** Attribution model name. */ | 689 /** Attribution model name. This field is ignored. */ |
| 688 core.String attributionModel; | 690 core.String attributionModel; |
| 689 | 691 |
| 690 /** DS campaign ID. */ | 692 /** DS campaign ID. */ |
| 691 core.String campaignId; | 693 core.String campaignId; |
| 692 | 694 |
| 693 /** DS click ID for the conversion. */ | 695 /** DS click ID for the conversion. */ |
| 694 core.String clickId; | 696 core.String clickId; |
| 695 | 697 |
| 696 /** Advertiser-provided ID for the conversion, also known as the order ID. */ | 698 /** Advertiser-provided ID for the conversion, also known as the order ID. */ |
| 697 core.String conversionId; | 699 core.String conversionId; |
| 698 | 700 |
| 699 /** | 701 /** |
| 700 * The time at which the conversion was last modified, in epoch millis UTC. | 702 * The time at which the conversion was last modified, in epoch millis UTC. |
| 701 */ | 703 */ |
| 702 core.String conversionModifiedTimestamp; | 704 core.String conversionModifiedTimestamp; |
| 703 | 705 |
| 704 /** The time at which the conversion took place, in epoch millis UTC. */ | 706 /** The time at which the conversion took place, in epoch millis UTC. */ |
| 705 core.String conversionTimestamp; | 707 core.String conversionTimestamp; |
| 706 | 708 |
| 707 /** Conversion count in millis. */ | 709 /** |
| 710 * The number of conversions, formatted in millis (conversions multiplied by |
| 711 * 1000). This field is ignored. |
| 712 */ |
| 708 core.String countMillis; | 713 core.String countMillis; |
| 709 | 714 |
| 710 /** DS criterion (keyword) ID. */ | 715 /** DS criterion (keyword) ID. */ |
| 711 core.String criterionId; | 716 core.String criterionId; |
| 712 | 717 |
| 713 /** | 718 /** |
| 714 * The currency code for the conversion's revenue. Should be in ISO 4217 | 719 * The currency code for the conversion's revenue. Should be in ISO 4217 |
| 715 * alphabetic (3-char) format. | 720 * alphabetic (3-char) format. |
| 716 */ | 721 */ |
| 717 core.String currencyCode; | 722 core.String currencyCode; |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 _json["name"] = name; | 1033 _json["name"] = name; |
| 1029 } | 1034 } |
| 1030 if (value != null) { | 1035 if (value != null) { |
| 1031 _json["value"] = value; | 1036 _json["value"] = value; |
| 1032 } | 1037 } |
| 1033 return _json; | 1038 return _json; |
| 1034 } | 1039 } |
| 1035 } | 1040 } |
| 1036 | 1041 |
| 1037 | 1042 |
| 1038 /** Not documented yet. */ | |
| 1039 class ReportFiles { | 1043 class ReportFiles { |
| 1040 /** The size of this report file in bytes. */ | 1044 /** The size of this report file in bytes. */ |
| 1041 core.String byteCount; | 1045 core.String byteCount; |
| 1042 | 1046 |
| 1043 /** Use this url to download the report file. */ | 1047 /** Use this url to download the report file. */ |
| 1044 core.String url; | 1048 core.String url; |
| 1045 | 1049 |
| 1046 | 1050 |
| 1047 ReportFiles(); | 1051 ReportFiles(); |
| 1048 | 1052 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 _json["savedColumnName"] = savedColumnName; | 1319 _json["savedColumnName"] = savedColumnName; |
| 1316 } | 1320 } |
| 1317 if (startDate != null) { | 1321 if (startDate != null) { |
| 1318 _json["startDate"] = startDate; | 1322 _json["startDate"] = startDate; |
| 1319 } | 1323 } |
| 1320 return _json; | 1324 return _json; |
| 1321 } | 1325 } |
| 1322 } | 1326 } |
| 1323 | 1327 |
| 1324 | 1328 |
| 1325 /** Not documented yet. */ | |
| 1326 class ReportRequestFilters { | 1329 class ReportRequestFilters { |
| 1327 /** | 1330 /** |
| 1328 * Column to perform the filter on. This can be a DoubleClick Search column or | 1331 * Column to perform the filter on. This can be a DoubleClick Search column or |
| 1329 * a saved column. | 1332 * a saved column. |
| 1330 */ | 1333 */ |
| 1331 ReportApiColumnSpec column; | 1334 ReportApiColumnSpec column; |
| 1332 | 1335 |
| 1333 /** | 1336 /** |
| 1334 * Operator to use in the filter. See the filter reference for a list of | 1337 * Operator to use in the filter. See the filter reference for a list of |
| 1335 * available operators. | 1338 * available operators. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 _json["operator"] = operator; | 1371 _json["operator"] = operator; |
| 1369 } | 1372 } |
| 1370 if (values != null) { | 1373 if (values != null) { |
| 1371 _json["values"] = values; | 1374 _json["values"] = values; |
| 1372 } | 1375 } |
| 1373 return _json; | 1376 return _json; |
| 1374 } | 1377 } |
| 1375 } | 1378 } |
| 1376 | 1379 |
| 1377 | 1380 |
| 1378 /** Not documented yet. */ | |
| 1379 class ReportRequestOrderBy { | 1381 class ReportRequestOrderBy { |
| 1380 /** | 1382 /** |
| 1381 * Column to perform the sort on. This can be a DoubleClick Search-defined | 1383 * Column to perform the sort on. This can be a DoubleClick Search-defined |
| 1382 * column or a saved column. | 1384 * column or a saved column. |
| 1383 */ | 1385 */ |
| 1384 ReportApiColumnSpec column; | 1386 ReportApiColumnSpec column; |
| 1385 | 1387 |
| 1386 /** The sort direction, which is either ascending or descending. */ | 1388 /** The sort direction, which is either ascending or descending. */ |
| 1387 core.String sortOrder; | 1389 core.String sortOrder; |
| 1388 | 1390 |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1911 } | 1913 } |
| 1912 | 1914 |
| 1913 core.Map toJson() { | 1915 core.Map toJson() { |
| 1914 var _json = new core.Map(); | 1916 var _json = new core.Map(); |
| 1915 if (availabilities != null) { | 1917 if (availabilities != null) { |
| 1916 _json["availabilities"] = availabilities.map((value) => (value).toJson()).
toList(); | 1918 _json["availabilities"] = availabilities.map((value) => (value).toJson()).
toList(); |
| 1917 } | 1919 } |
| 1918 return _json; | 1920 return _json; |
| 1919 } | 1921 } |
| 1920 } | 1922 } |
| 1921 | |
| 1922 | |
| OLD | NEW |