UNPKG

google-ads-api-client

Version:

A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.

88 lines 3.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AdServiceClient = void 0; const ad_service_1 = require("./ad_service"); const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc"); // Proto file describing the Ad service. /** * Service to manage ads. * * @generated from protobuf service google.ads.googleads.v11.services.AdService */ class AdServiceClient { constructor(_transport) { this._transport = _transport; this.typeName = ad_service_1.AdService.typeName; this.methods = ad_service_1.AdService.methods; this.options = ad_service_1.AdService.options; } /** * Returns the requested ad in full detail. * * List of thrown errors: * [AuthenticationError]() * [AuthorizationError]() * [HeaderError]() * [InternalError]() * [QuotaError]() * [RequestError]() * * @generated from protobuf rpc: GetAd(google.ads.googleads.v11.services.GetAdRequest) returns (google.ads.googleads.v11.resources.Ad); */ getAd(input, options) { const method = this.methods[0], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } /** * Updates ads. Operation statuses are returned. Updating ads is not supported * for TextAd, ExpandedDynamicSearchAd, GmailAd and ImageAd. * * List of thrown errors: * [AdCustomizerError]() * [AdError]() * [AdSharingError]() * [AdxError]() * [AssetError]() * [AssetLinkError]() * [AuthenticationError]() * [AuthorizationError]() * [CollectionSizeError]() * [DatabaseError]() * [DateError]() * [DistinctError]() * [FeedAttributeReferenceError]() * [FieldError]() * [FieldMaskError]() * [FunctionError]() * [FunctionParsingError]() * [HeaderError]() * [IdError]() * [ImageError]() * [InternalError]() * [ListOperationError]() * [MediaBundleError]() * [MediaFileError]() * [MutateError]() * [NewResourceCreationError]() * [NotEmptyError]() * [NullError]() * [OperatorError]() * [PolicyFindingError]() * [PolicyViolationError]() * [QuotaError]() * [RangeError]() * [RequestError]() * [SizeLimitError]() * [StringFormatError]() * [StringLengthError]() * [UrlFieldError]() * * @generated from protobuf rpc: MutateAds(google.ads.googleads.v11.services.MutateAdsRequest) returns (google.ads.googleads.v11.services.MutateAdsResponse); */ mutateAds(input, options) { const method = this.methods[1], opt = this._transport.mergeOptions(options); return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input); } } exports.AdServiceClient = AdServiceClient; //# sourceMappingURL=ad_service.client.js.map