Skip to content

Commit

Permalink
Target es6, use Object.assign (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and jmdobry committed May 12, 2017
1 parent 14e7377 commit 37347b5
Show file tree
Hide file tree
Showing 184 changed files with 35,823 additions and 37,561 deletions.
13 changes: 6 additions & 7 deletions apis/acceleratedmobilepageurl/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@

/* jshint maxlen: false */

const createAPIRequest = require('../../lib/apirequest');
const utils = require('../../lib/utils');
import createAPIRequest from '../../lib/apirequest';

/**
* Accelerated Mobile Pages (AMP) URL API
*
* This API contains a single method, batchGet. Call this method to retrieve the AMP URL (and equivalent AMP Cache URL) for given public URL(s).
* Retrieves the list of AMP URL (and equivalent AMP Cache URL) for a given list of public URL(s).
*
* @example
Expand Down Expand Up @@ -63,7 +62,7 @@ function Acceleratedmobilepageurl(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://acceleratedmobilepageurl.googleapis.com/v1/ampUrls:batchGet',
method: 'POST'
}, options),
Expand Down Expand Up @@ -93,18 +92,18 @@ only once.
* @typedef AmpUrl
* @memberOf! acceleratedmobilepageurl(v1)
* @type object
* @property {string} originalUrl The original non-AMP URL.
* @property {string} ampUrl The AMP URL pointing to the publisher's web server.
* @property {string} cdnAmpUrl The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to
the cached document in the Google AMP Cache.
* @property {string} originalUrl The original non-AMP URL.
* @property {string} ampUrl The AMP URL pointing to the publisher's web server.
*/
/**
* @typedef AmpUrlError
* @memberOf! acceleratedmobilepageurl(v1)
* @type object
* @property {string} errorMessage An optional descriptive error message.
* @property {string} errorCode The error code of an API call.
* @property {string} originalUrl The original non-AMP URL.
* @property {string} errorMessage An optional descriptive error message.
*/
/**
* @typedef BatchGetAmpUrlsRequest
Expand Down
17 changes: 8 additions & 9 deletions apis/adexchangebuyer/v1.2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

/* jshint maxlen: false */

const createAPIRequest = require('../../lib/apirequest');
const utils = require('../../lib/utils');
import createAPIRequest from '../../lib/apirequest';

/**
* Ad Exchange Buyer API
Expand Down Expand Up @@ -62,7 +61,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.2/accounts/{id}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -96,7 +95,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.2/accounts',
method: 'GET'
}, options),
Expand Down Expand Up @@ -132,7 +131,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.2/accounts/{id}',
method: 'PATCH'
}, options),
Expand Down Expand Up @@ -168,7 +167,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.2/accounts/{id}',
method: 'PUT'
}, options),
Expand Down Expand Up @@ -208,7 +207,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.2/creatives/{accountId}/{buyerCreativeId}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -243,7 +242,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.2/creatives',
method: 'POST'
}, options),
Expand Down Expand Up @@ -280,7 +279,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.2/creatives',
method: 'GET'
}, options),
Expand Down
45 changes: 22 additions & 23 deletions apis/adexchangebuyer/v1.3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

/* jshint maxlen: false */

const createAPIRequest = require('../../lib/apirequest');
const utils = require('../../lib/utils');
import createAPIRequest from '../../lib/apirequest';

/**
* Ad Exchange Buyer API
Expand Down Expand Up @@ -62,7 +61,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/accounts/{id}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -96,7 +95,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/accounts',
method: 'GET'
}, options),
Expand Down Expand Up @@ -132,7 +131,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/accounts/{id}',
method: 'PATCH'
}, options),
Expand Down Expand Up @@ -168,7 +167,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/accounts/{id}',
method: 'PUT'
}, options),
Expand Down Expand Up @@ -207,7 +206,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo/{accountId}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -241,7 +240,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo',
method: 'GET'
}, options),
Expand Down Expand Up @@ -281,7 +280,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -318,7 +317,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}',
method: 'PATCH'
}, options),
Expand Down Expand Up @@ -355,7 +354,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}',
method: 'PUT'
}, options),
Expand Down Expand Up @@ -395,7 +394,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/creatives/{accountId}/{buyerCreativeId}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -430,7 +429,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/creatives',
method: 'POST'
}, options),
Expand Down Expand Up @@ -469,7 +468,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/creatives',
method: 'GET'
}, options),
Expand Down Expand Up @@ -508,7 +507,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/directdeals/{id}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -542,7 +541,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/directdeals',
method: 'GET'
}, options),
Expand Down Expand Up @@ -585,7 +584,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/performancereport',
method: 'GET'
}, options),
Expand Down Expand Up @@ -625,7 +624,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}',
method: 'DELETE'
}, options),
Expand Down Expand Up @@ -661,7 +660,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -697,7 +696,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}',
method: 'POST'
}, options),
Expand Down Expand Up @@ -732,7 +731,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}',
method: 'GET'
}, options),
Expand Down Expand Up @@ -769,7 +768,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}',
method: 'PATCH'
}, options),
Expand Down Expand Up @@ -806,7 +805,7 @@ function Adexchangebuyer(options) { // eslint-disable-line
options || (options = {});

const parameters = {
options: utils.extend({
options: Object.assign({
url: 'https://www.googleapis.com/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}',
method: 'PUT'
}, options),
Expand Down
Loading

0 comments on commit 37347b5

Please sign in to comment.