GoogleOauth2.0 First implementation

First try for GoogleOauth2.0
This commit is contained in:
Georg Reisinger
2018-10-26 14:02:15 +02:00
parent 216a04e233
commit b171f1646c
1880 changed files with 912953 additions and 7 deletions

57
express-server/node_modules/googleapis/CHANGELOG.md generated vendored Normal file
View File

@ -0,0 +1,57 @@
# Changelog
[npm history][1]
[1]: https://www.npmjs.com/package/googleapis?activeTab=versions
## v34.0.0
Welcome to the `googleapis@34` 🎊 This release has breaking changes, new features, and a bunch of bug fixes. Enjoy!
The following APIs have been removed:
- adexchangeseller/v1.1
- adexchangeseller/v1'
- adexchangeseller/v2.0
- sqladmin/v1beta3
The following APIs have been added:
- cloudtasks/v2beta3
- redis/v1
- file/v1beta1
- jobs/v3p1beta1
- videointelligence/v1p1beta1
### Fixes
- fix: upgrade to the latest google-auth-library ([#1313](https://github.com/google/google-api-nodejs-client/pull/1313))
- fix: add better error handling around sample client and redirect URIs ([#1285](https://github.com/google/google-api-nodejs-client/pull/1285))
- chore(deps): update dependency p-queue to v3 ([#1310](https://github.com/google/google-api-nodejs-client/pull/1310))
- chore(deps): update dependency nyc to v13 ([#1307](https://github.com/google/google-api-nodejs-client/pull/1307))
### New Features
- feat: run the generator ([#1359](https://github.com/google/google-api-nodejs-client/pull/1359))
- feat: run the generator ([#1326](https://github.com/google/google-api-nodejs-client/pull/1326))
- feat: run the generator and synth ([#1324](https://github.com/google/google-api-nodejs-client/pull/1324))
### Documentation
- docs: add supported versions of node.js to the readme ([#1355](https://github.com/google/google-api-nodejs-client/pull/1355))
- docs: fix generator script path ([#1345](https://github.com/google/google-api-nodejs-client/pull/1345))
- docs: replace google/ with googleapis/ in URIs ([#1342](https://github.com/google/google-api-nodejs-client/pull/1342))
- docs: Fix error handling in batchGet sample ([#1338](https://github.com/google/google-api-nodejs-client/pull/1338))
- docs: Add statement of support to readme ([#1333](https://github.com/google/google-api-nodejs-client/pull/1333))
- docs: Remove reference docs ([#1331](https://github.com/google/google-api-nodejs-client/pull/1331))
### Internal / Testing Changes
- Update the kokoro config ([#1353](https://github.com/google/google-api-nodejs-client/pull/1353))
- test: remove appveyor config ([#1357](https://github.com/google/google-api-nodejs-client/pull/1357))
- Do not generate libraries with synth ([#1350](https://github.com/google/google-api-nodejs-client/pull/1350))
- Enable prefer-const in the eslint config ([#1347](https://github.com/google/google-api-nodejs-client/pull/1347))
- Fix the sample tests ([#1344](https://github.com/google/google-api-nodejs-client/pull/1344))
- Make npm install timeout configurable ([#1343](https://github.com/google/google-api-nodejs-client/pull/1343))
- Enable no-var in eslint ([#1340](https://github.com/google/google-api-nodejs-client/pull/1340))
- Use prettier and eslint on samples ([#1341](https://github.com/google/google-api-nodejs-client/pull/1341))
- Fix samples tests ([#1323](https://github.com/google/google-api-nodejs-client/pull/1323))
- Use synth templating and update CI ([#1321](https://github.com/google/google-api-nodejs-client/pull/1321))
- Retry npm install in CI ([#1320](https://github.com/google/google-api-nodejs-client/pull/1320))
- Add synth.py for automating client library generation ([#1306](https://github.com/google/google-api-nodejs-client/pull/1306))

545
express-server/node_modules/googleapis/README.md generated vendored Normal file
View File

@ -0,0 +1,545 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# Google APIs Node.js Client
[![Release Level][releaselevelimg]][releaselevel]
[![CircleCI][circleimg]][circle]
[![npm version][npmimg]][npm]
[![Code Coverage][codecovimg]][codecov]
[![Downloads][downloadsimg]][downloads]
[![Dependency Status][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[Node.js][node] client library for using Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT tokens is included.
* [Google APIs](#google-apis)
* [Getting started](#getting-started)
* [Installation](#installation)
* [First example](#first-example)
* [Samples](#samples)
* [Reference API](#reference-api)
* [Authentication and authorization](#authentication-and-authorization)
* [OAuth2 client](#oauth2-client)
* [Using API keys](#using-api-keys)
* [Service <--> Service authentication](#service-to-service-authentication)
* [Setting global or service-level auth](#setting-global-or-service-level-auth)
* [Usage](#usage)
* [Specifying request body](#specifying-request-body)
* [Media uploads](#media-uploads)
* [Request Options](#request-options)
* [Using a Proxy](#using-a-proxy)
* [Supported APIs](#getting-supported-apis)
* [TypeScript](#typescript)
* [License](#license)
* [Contributing](#contributing)
* [Questions/problems?](#questionsproblems)
## Google APIs
The full list of supported APIs can be found [here][supported-list]. The API endpoints are automatically generated, so if the API is not in the list, it is currently not supported by this API client library.
Supported APIs are listed on the [Google APIs Explorer][apiexplorer].
### Working with Google Cloud Platform APIs?
If you're working with [Google Cloud Platform][cloudplatform] APIs such as Datastore, Cloud Storage or Pub/Sub, consider using the [`@google-cloud`][googlecloud] client libraries: single purpose idiomatic Node.js clients for Google Cloud Platform services.
### Support and maintenance
These client libraries are official supported by Google. However, these libraries are considered complete and are in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features. For Google Cloud Platform APIs, we recommend using [google-cloud-node](https://github.com/GoogleCloudPlatform/google-cloud-node) which is under active development.
This library supports the maintenance LTS, active LTS, and current release of node.js. See the [node.js release schedule](https://github.com/nodejs/Release) for more information.
## Getting started
### Installation
This library is distributed on `npm`. In order to add it as a dependency, run the following command:
``` sh
$ npm install googleapis
```
### First example
This is a very simple example. This creates a Blogger client and retrieves the details of a blog given the blog Id:
``` js
const {google} = require('googleapis');
// Each API may support multiple version. With this sample, we're getting
// v3 of the blogger API, and using an API key to authenticate.
const blogger = google.blogger({
version: 'v3',
auth: 'YOUR API KEY'
});
const params = {
blogId: 3213900
};
// get the blog details
blogger.blogs.get(params, (err, res) => {
if (err) {
console.error(err);
throw err;
}
console.log(`The blog url is ${res.data.url}`);
});
```
Instead of using callbacks you can also use promises!
``` js
blogger.blogs.get(params)
.then(res => {
console.log(`The blog url is ${res.data.url}`);
})
.catch(error => {
console.error(error);
});
```
Or async/await:
``` js
async function runSample() {
const res = await blogger.blogs.get(params);
console.log(`The blog url is ${res.data.url}`);
}
runSample().catch(console.error);
```
### Samples
There are a lot of [samples](https://github.com/googleapis/google-api-nodejs-client/tree/master/samples) 🤗 If you're trying to figure out how to use an API ... look there first! If there's a sample you need missing, feel free to file an [issue][bugs].
## Authentication and authorization
The are three primary ways to authenticate to Google APIs. Some service support all authentication methods, other may only support one or two.
- **OAuth2** - This allows you to make API calls on behalf of a given user. In this model, the user visits your application, signs in with their Google account, and provides your application with authorization against a set of scopes. [Learn more](#oauth2-client).
- **Service <--> Service** - In this model, your application talks directly to Google APIs using a Service Account. It's useful when you have a backend application that will talk directly to Google APIs from the backend. [Learn more](#service-to-service-authentication).
- **API Key** - With an API key, you can access your service from a client or the server. Typically less secure, this is only available on a small subset of services with limited scopes. [Learn more](#using-api-keys).
To learn more about the authentication client, see the [Google Auth Library](https://github.com/googleapis/google-auth-library-nodejs).
### OAuth2 client
This client comes with an [OAuth2][oauth] client that allows you to retrieve an access token and refreshes the token and retry the request seamlessly The basics of Google's OAuth2 implementation is explained on [Google Authorization and Authentication documentation][authdocs].
In the following examples, you may need a `CLIENT_ID`, `CLIENT_SECRET` and `REDIRECT_URL`. You can find these pieces of information by going to the [Developer Console][devconsole], clicking your project --> APIs & auth --> credentials.
For more information about OAuth2 and how it works, [see here][oauth].
A complete sample application that authorizes and authenticates with the OAuth2 client is available at [`samples/oauth2.js`][oauthexample].
#### Generating an authentication URL
To ask for permissions from a user to retrieve an access token, you redirect them to a consent page. To create a consent page URL:
``` js
const {google} = require('googleapis');
const oauth2Client = new google.auth.OAuth2(
YOUR_CLIENT_ID,
YOUR_CLIENT_SECRET,
YOUR_REDIRECT_URL
);
// generate a url that asks permissions for Google+ and Google Calendar scopes
const scopes = [
'https://www.googleapis.com/auth/plus.me',
'https://www.googleapis.com/auth/calendar'
];
const url = oauth2Client.generateAuthUrl({
// 'online' (default) or 'offline' (gets refresh_token)
access_type: 'offline',
// If you only need one scope you can pass it as a string
scope: scopes
});
```
**IMPORTANT NOTE** - The `refresh_token` is only returned on the first authorization. More details [here](https://github.com/googleapis/google-api-nodejs-client/issues/750#issuecomment-304521450).
#### Retrieve authorization code
Once a user has given permissions on the consent page, Google will redirect the page to the redirect URL you have provided with a code query parameter.
GET /oauthcallback?code={authorizationCode}
#### Retrieve access token
With the code returned, you can ask for an access token as shown below:
``` js
// This will provide an object with the access_token and refresh_token.
// Save these somewhere safe so they can be used at a later time.
const {tokens} = await oauth2Client.getToken(code)
oauth2Client.setCredentials(tokens);
```
With the credentials set on your OAuth2 client - you're ready to go!
#### Handling refresh tokens
Access tokens expire. This library will automatically use a refresh token to obtain a new access token if it is about to expire. An easy way to make sure you always store the most recent tokens is to use the `tokens` event:
```js
oauth2client.on('tokens', (tokens) => {
if (tokens.refresh_token) {
// store the refresh_token in my database!
console.log(tokens.refresh_token);
}
console.log(tokens.access_token);
});
```
To set the `refresh_token` at a later time, you can use the `setCredentials` method:
```js
oauth2client.setCredentials({
refresh_token: `STORED_REFRESH_TOKEN`
});
```
Once the client has a refresh token, access tokens will be acquired and refreshed automatically in the next call to the API.
### Using API keys
You may need to send an API key with the request you are going to make. The following uses an API key to make a request to the Google+ API service to retrieve a person's profile given a userId:
``` js
const {google} = require('googleapis');
const plus = google.plus({
version: 'v1',
auth: 'YOUR_API_KEY' // specify your API key here
});
async function main() {
const res = await plus.people.get({ userId: 'me' });
console.log(`Hello ${res.data.displayName}!`);
};
main().catch(console.error);
```
To learn more about API keys, please see the [documentation][usingkeys].
#### Service to Service Authentication
Rather than manually creating an OAuth2 client, JWT client, or Compute client, the auth library can create the correct credential type for you, depending upon the environment your code is running under.
For example, a JWT auth client will be created when your code is running on your local developer machine, and a Compute client will be created when the same code is running on a configured instance of Google Compute Engine.
The code below shows how to retrieve a default credential type, depending upon the runtime environment. The createScopedRequired must be called to determine when you need to pass in the scopes manually, and when they have been set for you automatically based on the configured runtime environment.
```js
async function main () {
// This method looks for the GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS
// environment variables.
const auth = await google.auth.getClient({
// Scopes can be specified either as an array or as a single, space-delimited string.
scopes: ['https://www.googleapis.com/auth/compute']
});
// obtain the current project Id
const project = await google.auth.getDefaultProjectId();
// Fetch the list of GCE zones within a project.
const res = await compute.zones.list({ project, auth });
console.log(res.data);
}
main().catch(console.error);
```
### Setting global or service-level auth
You can set the `auth` as a global or service-level option so you don't need to specify it every request. For example, you can set `auth` as a global option:
``` js
const {google} = require('googleapis');
const oauth2Client = new google.auth.OAuth2(
YOUR_CLIENT_ID,
YOUR_CLIENT_SECRET,
YOUR_REDIRECT_URL
);
// set auth as a global default
google.options({
auth: oauth2Client
});
```
Instead of setting the option globally, you can also set the authentication client at the service-level:
``` js
const {google} = require('googleapis');
const oauth2Client = new google.auth.OAuth2(
YOUR_CLIENT_ID,
YOUR_CLIENT_SECRET,
YOUR_REDIRECT_URL
);
const drive = google.drive({
version: 'v2',
auth: oauth2Client
});
```
See the [Options section][options] for more information.
## Usage
### Specifying request body
The body of the request is specified in the `requestBody` parameter object of the request. The body is specified as a JavaScript object with key/value pairs. For example, this sample creates a watcher that posts notifications to a Google Cloud Pub/Sub topic when emails are sent to a gmail account:
```js
const res = await gmail.users.watch({
userId: 'me',
requestBody: {
// Replace with `projects/${PROJECT_ID}/topics/${TOPIC_NAME}`
topicName: `projects/el-gato/topics/gmail`
}
});
console.log(res.data);
```
### Media uploads
This client supports multipart media uploads. The resource parameters are specified in the `requestBody` parameter object, and the media itself is specified in the `media.body` parameter with mime-type specified in `media.mimeType`.
This example uploads a plain text file to Google Drive with the title "Test" and contents "Hello World".
``` js
const drive = google.drive({
version: 'v3',
auth: oauth2Client
});
const res = await drive.files.create({
requestBody: {
name: 'Test',
mimeType: 'text/plain'
},
media: {
mimeType: 'text/plain',
body: 'Hello World'
}
});
```
You can also upload media by specifying `media.body` as a [Readable stream][stream]. This can allow you to upload very large files that cannot fit into memory.
```js
const fs = require('fs');
const drive = google.drive({
version: 'v3',
auth: oauth2Client
});
async function main() {
const res = await drive.files.create({
requestBody: {
name: 'testimage.png',
mimeType: 'image/png'
},
media: {
mimeType: 'image/png',
body: fs.createReadStream('awesome.png')
}
});
console.log(res.data);
}
main().catch(console.error);
```
For more examples of creation and modification requests with media attachments, take a look at the `samples/drive/upload.js` sample.
### Request Options
For more fine-tuned control over how your API calls are made, we provide you with the ability to specify additional options that can be applied directly to the ['axios'][axios] object used in this library to make network calls to the API.
You may specify additional options either in the global `google` object or on a service client basis. The options you specify are attached to the `axios` object so whatever `axios` supports, this library supports. You may also specify global or per-service request parameters that will be attached to all API calls you make.
A full list of supported options can be [found here][requestopts].
#### Global options
You can choose default options that will be sent with each request. These options will be used for every service instantiated by the google client. In this example, the `timeout` property of `AxiosRequestConfig` will be set for every request:
```js
const {google} = require('googleapis');
google.options({
// All requests made with this object will use these settings unless overridden.
timeout: 1000,
auth: auth
});
```
You can also modify the parameters sent with each request:
```js
const {google} = require('googleapis');
google.options({
// All requests from all services will contain the above query parameter
// unless overridden either in a service client or in individual API calls.
params: {
quotaUser: 'user123@example.com'
}
});
```
#### Service-client options
You can also specify options when creating a service client.
```js
const blogger = google.blogger({
version: 'v3',
// All requests made with this object will use the specified auth.
auth: 'API KEY';
});
```
By doing this, every API call made with this service client will use `'API KEY'` to authenticate.
**Note:** Created clients are **immutable** so you must create a new one if you want to specify different options.
Similar to the examples above, you can also modify the parameters used for every call of a given service:
```js
const blogger = google.blogger({
version: 'v3',
// All requests made with this service client will contain the
// blogId query parameter unless overridden in individual API calls.
params: {
blogId: 3213900
}
});
// Calls with this drive client will NOT contain the blogId query parameter.
const drive = google.drive('v3');
...
```
#### Request-level options
You can specify an `auth` object to be used per request. Each request also inherits the options specified at the service level and global level.
For example:
```js
const {google} = require('googleapis');
const bigquery = google.bigquery('v2');
async function main() {
// This method looks for the GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS
// environment variables.
const client = await google.auth.getClient({
scopes: ['https://www.googleapis.com/auth/cloud-platform']
});
const projectId = await google.auth.getDefaultProjectId();
const request = {
projectId,
datasetId: '<YOUR_DATASET_ID>',
// This is a "request-level" option
auth: client
};
const res = await bigquery.datasets.delete(request);
console.log(res.data);
}
main().catch(console.error);
```
You can also override *axios* options per request, such as `url`, `method`, and `encoding`.
For example:
```js
const res = await drive.files.export({
fileId: 'asxKJod9s79', // A Google Doc
mimeType: 'application/pdf'
}, {
// Make sure we get the binary data
encoding: null
});
```
### Using a Proxy
You can use the following environment variables to proxy HTTP and HTTPS requests:
- `HTTP_PROXY` / `http_proxy`
- `HTTPS_PROXY` / `https_proxy`
When HTTP_PROXY / http_proxy are set, they will be used to proxy non-SSL requests that do not have an explicit proxy configuration option present. Similarly, HTTPS_PROXY / https_proxy will be respected for SSL requests that do not have an explicit proxy configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the proxy configuration option.
### Getting Supported APIs
You can programatically obtain the list of supported APIs, and all available versions:
```js
const {google} = require('googleapis');
const apis = google.getSupportedAPIs();
```
This will return an object with the API name as object property names, and an array of version strings as the object values;
### TypeScript
This library is written in TypeScript, and provides types out of the box. All classes and interfaces generated for each API are exported under the `${apiName}_${version}` namespace. For example, the Drive v3 API types are are all available from the `drive_v3` namespace:
```ts
import { drive_v3 } from 'googleapis';
```
## Release Notes & Breaking Changes
You can find a detailed list of breaking changes and new features in our [Release Notes][releasenotes]. If you've used this library before `25.x`, see our [Release Notes][releasenotes] to learn about migrating your code from `24.x.x` to `25.x.x`. It's pretty easy :)
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING][copying].
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING][contributing].
## Questions/problems?
* Ask your development related questions on [Stackoverflow][stackoverflow].
* If you've found an bug/issue, please [file it on GitHub][bugs].
[snyk-image]: https://snyk.io/test/github/googleapis/google-api-nodejs-client/badge.svg
[snyk-url]: https://snyk.io/test/github/googleapis/google-api-nodejs-client
[david-image]: https://david-dm.org/googleapis/google-api-nodejs-client.svg
[david-url]: https://david-dm.org/googleapis/google-api-nodejs-client
[npmimg]: https://img.shields.io/npm/v/googleapis.svg
[npm]: https://www.npmjs.org/package/googleapis
[circle]: https://circleci.com/gh/googleapis/google-api-nodejs-client
[circleimg]: https://circleci.com/gh/googleapis/google-api-nodejs-client.svg?style=shield
[releaselevel]: https://cloud.google.com/terms/launch-stages
[releaselevelimg]: https://img.shields.io/badge/Release%20Level-Alpha-ff69b4.svg
[supported-list]: https://developers.google.com/apis-explorer/
[bugs]: https://github.com/googleapis/google-api-nodejs-client/issues
[node]: http://nodejs.org/
[stackoverflow]: http://stackoverflow.com/questions/tagged/google-api-nodejs-client
[apiexplorer]: https://developers.google.com/apis-explorer
[usingkeys]: https://support.google.com/cloud/answer/6158862?hl=en
[contributing]: https://github.com/googleapis/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md
[copying]: https://github.com/googleapis/google-api-nodejs-client/tree/master/COPYING
[authdocs]: https://developers.google.com/identity/protocols/OpenIDConnect
[axios]: https://github.com/axios/axios
[requestopts]: https://github.com/axios/axios#request-config
[stream]: http://nodejs.org/api/stream.html#stream_class_stream_readable
[releasenotes]: https://github.com/googleapis/google-api-nodejs-client/releases
[devconsole]: https://console.developer.google.com
[oauth]: https://developers.google.com/identity/protocols/OAuth2
[oauthexample]: https://github.com/googleapis/google-api-nodejs-client/tree/master/samples/oauth2.js
[options]: https://github.com/googleapis/google-api-nodejs-client/tree/master#options
[googlecloud]: https://cloud.google.com/nodejs/docs/reference/libraries
[googlecloudapis]: https://cloud.google.com/nodejs/docs/reference/apis
[cloudplatform]: https://cloud.google.com/docs/
[codecovimg]: https://codecov.io/github/googleapis/google-api-nodejs-client/coverage.svg?branch=master
[codecov]: https://codecov.io/github/googleapis/google-api-nodejs-client?branch=master
[downloadsimg]: https://img.shields.io/npm/dm/googleapis.svg
[downloads]: https://nodei.co/npm/googleapis/

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/abusiveexperiencereport
> View Abusive Experience Report data, and get a list of sites that have a significant number of abusive experiences.
## Installation
```sh
$ npm install @google/abusiveexperiencereport
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,6 @@
import { abusiveexperiencereport_v1 } from './v1';
export declare const VERSIONS: {
'v1': typeof abusiveexperiencereport_v1.Abusiveexperiencereport;
};
export declare function abusiveexperiencereport(version: 'v1'): abusiveexperiencereport_v1.Abusiveexperiencereport;
export declare function abusiveexperiencereport(options: abusiveexperiencereport_v1.Options): abusiveexperiencereport_v1.Abusiveexperiencereport;

View File

@ -0,0 +1,25 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
exports.VERSIONS = {
'v1': v1_1.abusiveexperiencereport_v1.Abusiveexperiencereport,
};
function abusiveexperiencereport(versionOrOptions) {
return googleapis_common_1.getAPI('abusiveexperiencereport', versionOrOptions, exports.VERSIONS, this);
}
exports.abusiveexperiencereport = abusiveexperiencereport;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/abusiveexperiencereport/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,6BAAgD;AAEnC,QAAA,QAAQ,GAAG;IACtB,IAAI,EAAE,+BAA0B,CAAC,uBAAuB;CACzD,CAAC;AAOF,SACA,uBAAuB,CAEnB,gBAAyD;IAC3D,OAAO,0BAAM,CAAI,yBAAyB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAChF,CAAC;AALD,0DAKC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/abusiveexperiencereport",
"version": "0.1.0",
"description": "abusiveexperiencereport",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

View File

@ -0,0 +1,155 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace abusiveexperiencereport_v1 {
interface Options extends GlobalOptions {
version: 'v1';
}
/**
* Abusive Experience Report API
*
* View Abusive Experience Report data, and get a list of sites that have a
* significant number of abusive experiences.
*
* @example
* const {google} = require('googleapis');
* const abusiveexperiencereport = google.abusiveexperiencereport('v1');
*
* @namespace abusiveexperiencereport
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Abusiveexperiencereport
*/
class Abusiveexperiencereport {
_options: GlobalOptions;
google?: GoogleConfigurable;
root: this;
sites: Resource$Sites;
violatingSites: Resource$Violatingsites;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
getRoot(): this;
}
/**
* Response message for GetSiteSummary. Do not confuse with same message in
* google.ads.experiencereport.v1
*/
interface Schema$SiteSummaryResponse {
/**
* The status of the site reviewed for the abusive experiences.
*/
abusiveStatus?: string;
/**
* The date on which enforcement begins.
*/
enforcementTime?: string;
/**
* The abusive experience enforcement status of the site.
*/
filterStatus?: string;
/**
* The last time that the site changed status.
*/
lastChangeTime?: string;
/**
* A link that leads to a full abusive experience report.
*/
reportUrl?: string;
/**
* The name of the site reviewed.
*/
reviewedSite?: string;
/**
* Whether the site is currently under review.
*/
underReview?: boolean;
}
/**
* Response message for ListViolatingSites.
*/
interface Schema$ViolatingSitesResponse {
/**
* A list of summaries of violating sites.
*/
violatingSites?: Schema$SiteSummaryResponse[];
}
class Resource$Sites {
root: Abusiveexperiencereport;
constructor(root: Abusiveexperiencereport);
getRoot(): Abusiveexperiencereport;
/**
* abusiveexperiencereport.sites.get
* @desc Gets a summary of the abusive experience rating of a site.
* @alias abusiveexperiencereport.sites.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name The required site name. This is the site property whose abusive experiences have been reviewed, and it must be URL-encoded. For example, sites/https%3A%2F%2Fwww.google.com. The server will return an error of BAD_REQUEST if this field is not filled in. Note that if the site property is not yet verified in Search Console, the reportUrl field returned by the API will lead to the verification page, prompting the user to go through that process before they can gain access to the Abusive Experience Report.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Sites$Get, options?: MethodOptions): AxiosPromise<Schema$SiteSummaryResponse>;
get(params: Params$Resource$Sites$Get, options: MethodOptions | BodyResponseCallback<Schema$SiteSummaryResponse>, callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
get(params: Params$Resource$Sites$Get, callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
get(callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
}
interface Params$Resource$Sites$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The required site name. This is the site property whose abusive
* experiences have been reviewed, and it must be URL-encoded. For example,
* sites/https%3A%2F%2Fwww.google.com. The server will return an error of
* BAD_REQUEST if this field is not filled in. Note that if the site
* property is not yet verified in Search Console, the reportUrl field
* returned by the API will lead to the verification page, prompting the
* user to go through that process before they can gain access to the
* Abusive Experience Report.
*/
name?: string;
}
class Resource$Violatingsites {
root: Abusiveexperiencereport;
constructor(root: Abusiveexperiencereport);
getRoot(): Abusiveexperiencereport;
/**
* abusiveexperiencereport.violatingSites.list
* @desc Lists sites with Abusive Experience Report statuses of "Failing".
* @alias abusiveexperiencereport.violatingSites.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Violatingsites$List, options?: MethodOptions): AxiosPromise<Schema$ViolatingSitesResponse>;
list(params: Params$Resource$Violatingsites$List, options: MethodOptions | BodyResponseCallback<Schema$ViolatingSitesResponse>, callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
list(params: Params$Resource$Violatingsites$List, callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
list(callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
}
interface Params$Resource$Violatingsites$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
}
}

View File

@ -0,0 +1,138 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var abusiveexperiencereport_v1;
(function (abusiveexperiencereport_v1) {
/**
* Abusive Experience Report API
*
* View Abusive Experience Report data, and get a list of sites that have a
* significant number of abusive experiences.
*
* @example
* const {google} = require('googleapis');
* const abusiveexperiencereport = google.abusiveexperiencereport('v1');
*
* @namespace abusiveexperiencereport
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Abusiveexperiencereport
*/
class Abusiveexperiencereport {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.sites = new Resource$Sites(this);
this.violatingSites = new Resource$Violatingsites(this);
}
getRoot() {
return this.root;
}
}
abusiveexperiencereport_v1.Abusiveexperiencereport = Abusiveexperiencereport;
class Resource$Sites {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://abusiveexperiencereport.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
abusiveexperiencereport_v1.Resource$Sites = Resource$Sites;
class Resource$Violatingsites {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://abusiveexperiencereport.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/violatingSites')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
abusiveexperiencereport_v1.Resource$Violatingsites = Resource$Violatingsites;
})(abusiveexperiencereport_v1 = exports.abusiveexperiencereport_v1 || (exports.abusiveexperiencereport_v1 = {}));
//# sourceMappingURL=v1.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../../../src/apis/abusiveexperiencereport/v1.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAIH,yDAA2H;AAE3H,yBAAyB;AACzB,6BAA6B;AAC7B,gCAAgC;AAChC,+BAA+B;AAC/B,+BAA+B;AAE/B,IAAiB,0BAA0B,CA2Q1C;AA3QD,WAAiB,0BAA0B;IAKzC;;;;;;;;;;;;;;;OAeG;IACH,MAAa,uBAAuB;QAQlC,YAAY,OAAsB,EAAE,MAA2B;YAL/D,SAAI,GAAG,IAAI,CAAC;YAMV,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAExB,IAAI,CAAC,KAAK,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;YACtC,IAAI,CAAC,cAAc,GAAG,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;KACF;IApBY,kDAAuB,0BAoBnC,CAAA;IA+CD,MAAa,cAAc;QAEzB,YAAY,IAA6B;YACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QAuBD,GAAG,CAAC,gBACgD,EAChD,iBACgD,EAChD,QAA2D;YAE7D,IAAI,MAAM,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAA8B,CAAC;YACnE,IAAI,OAAO,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAkB,CAAC;YAEzD,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;gBAC1C,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM,GAAG,EAA+B,CAAC;gBACzC,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACT,OAAO,CAAC,OAAO,IAAI,iDAAiD,CAAC;YACzE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAClB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;oBAC5D,MAAM,EAAE,KAAK;iBACd,EACD,OAAO,CAAC;gBACZ,MAAM;gBACN,cAAc,EAAE,CAAC,MAAM,CAAC;gBACxB,UAAU,EAAE,CAAC,MAAM,CAAC;gBACpB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;aACxB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,oCAAgB,CAA6B,UAAU,EAAE,QAAQ,CAAC,CAAC;aACpE;iBAAM;gBACL,OAAO,oCAAgB,CAA6B,UAAU,CAAC,CAAC;aACjE;QACH,CAAC;KACF;IAxEY,yCAAc,iBAwE1B,CAAA;IAsBD,MAAa,uBAAuB;QAElC,YAAY,IAA6B;YACvC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QAyBD,IAAI,CACA,gBACmD,EACnD,iBACmD,EACnD,QAA8D;YAEhE,IAAI,MAAM,GACN,CAAC,gBAAgB,IAAI,EAAE,CAAwC,CAAC;YACpE,IAAI,OAAO,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAkB,CAAC;YAEzD,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;gBAC1C,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM,GAAG,EAAyC,CAAC;gBACnD,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACT,OAAO,CAAC,OAAO,IAAI,iDAAiD,CAAC;YACzE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAClB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,oBAAoB,CAAC;yBAC3B,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;oBACvC,MAAM,EAAE,KAAK;iBACd,EACD,OAAO,CAAC;gBACZ,MAAM;gBACN,cAAc,EAAE,EAAE;gBAClB,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;aACxB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,oCAAgB,CAAgC,UAAU,EAAE,QAAQ,CAAC,CAAC;aACvE;iBAAM;gBACL,OAAO,oCAAgB,CAAgC,UAAU,CAAC,CAAC;aACpE;QACH,CAAC;KACF;IA7EY,kDAAuB,0BA6EnC,CAAA;AAQH,CAAC,EA3QgB,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QA2Q1C"}

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/acceleratedmobilepageurl
> 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).
## Installation
```sh
$ npm install @google/acceleratedmobilepageurl
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,6 @@
import { acceleratedmobilepageurl_v1 } from './v1';
export declare const VERSIONS: {
'v1': typeof acceleratedmobilepageurl_v1.Acceleratedmobilepageurl;
};
export declare function acceleratedmobilepageurl(version: 'v1'): acceleratedmobilepageurl_v1.Acceleratedmobilepageurl;
export declare function acceleratedmobilepageurl(options: acceleratedmobilepageurl_v1.Options): acceleratedmobilepageurl_v1.Acceleratedmobilepageurl;

View File

@ -0,0 +1,25 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
exports.VERSIONS = {
'v1': v1_1.acceleratedmobilepageurl_v1.Acceleratedmobilepageurl,
};
function acceleratedmobilepageurl(versionOrOptions) {
return googleapis_common_1.getAPI('acceleratedmobilepageurl', versionOrOptions, exports.VERSIONS, this);
}
exports.acceleratedmobilepageurl = acceleratedmobilepageurl;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/acceleratedmobilepageurl/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,6BAAiD;AAEpC,QAAA,QAAQ,GAAG;IACtB,IAAI,EAAE,gCAA2B,CAAC,wBAAwB;CAC3D,CAAC;AAOF,SAAgB,wBAAwB,CAGpC,gBAA0D;IAC5D,OAAO,0BAAM,CACT,0BAA0B,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACpE,CAAC;AAND,4DAMC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/acceleratedmobilepageurl",
"version": "0.1.0",
"description": "acceleratedmobilepageurl",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

View File

@ -0,0 +1,145 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace acceleratedmobilepageurl_v1 {
interface Options extends GlobalOptions {
version: 'v1';
}
/**
* Accelerated Mobile Pages (AMP) URL API
*
* Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given
* list of public URL(s).
*
* @example
* const {google} = require('googleapis');
* const acceleratedmobilepageurl = google.acceleratedmobilepageurl('v1');
*
* @namespace acceleratedmobilepageurl
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Acceleratedmobilepageurl
*/
class Acceleratedmobilepageurl {
_options: GlobalOptions;
google?: GoogleConfigurable;
root: this;
ampUrls: Resource$Ampurls;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
getRoot(): this;
}
/**
* AMP URL response for a requested URL.
*/
interface Schema$AmpUrl {
/**
* The AMP URL pointing to the publisher&#39;s web server.
*/
ampUrl?: string;
/**
* The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to
* the cached document in the Google AMP Cache.
*/
cdnAmpUrl?: string;
/**
* The original non-AMP URL.
*/
originalUrl?: string;
}
/**
* AMP URL Error resource for a requested URL that couldn&#39;t be found.
*/
interface Schema$AmpUrlError {
/**
* The error code of an API call.
*/
errorCode?: string;
/**
* An optional descriptive error message.
*/
errorMessage?: string;
/**
* The original non-AMP URL.
*/
originalUrl?: string;
}
/**
* AMP URL request for a batch of URLs.
*/
interface Schema$BatchGetAmpUrlsRequest {
/**
* The lookup_strategy being requested.
*/
lookupStrategy?: string;
/**
* List of URLs to look up for the paired AMP URLs. The URLs are
* case-sensitive. Up to 50 URLs per lookup (see [Usage
* Limits](/amp/cache/reference/limits)).
*/
urls?: string[];
}
/**
* Batch AMP URL response.
*/
interface Schema$BatchGetAmpUrlsResponse {
/**
* For each URL in BatchAmpUrlsRequest, the URL response. The response might
* not be in the same order as URLs in the batch request. If
* BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated only
* once.
*/
ampUrls?: Schema$AmpUrl[];
/**
* The errors for requested URLs that have no AMP URL.
*/
urlErrors?: Schema$AmpUrlError[];
}
class Resource$Ampurls {
root: Acceleratedmobilepageurl;
constructor(root: Acceleratedmobilepageurl);
getRoot(): Acceleratedmobilepageurl;
/**
* acceleratedmobilepageurl.ampUrls.batchGet
* @desc Returns AMP URL(s) and equivalent [AMP Cache
* URL(s)](/amp/cache/overview#amp-cache-url-format).
* @alias acceleratedmobilepageurl.ampUrls.batchGet
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {().BatchGetAmpUrlsRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
batchGet(params?: Params$Resource$Ampurls$Batchget, options?: MethodOptions): AxiosPromise<Schema$BatchGetAmpUrlsResponse>;
batchGet(params: Params$Resource$Ampurls$Batchget, options: MethodOptions | BodyResponseCallback<Schema$BatchGetAmpUrlsResponse>, callback: BodyResponseCallback<Schema$BatchGetAmpUrlsResponse>): void;
batchGet(params: Params$Resource$Ampurls$Batchget, callback: BodyResponseCallback<Schema$BatchGetAmpUrlsResponse>): void;
batchGet(callback: BodyResponseCallback<Schema$BatchGetAmpUrlsResponse>): void;
}
interface Params$Resource$Ampurls$Batchget {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Request body metadata
*/
requestBody?: Schema$BatchGetAmpUrlsRequest;
}
}

View File

@ -0,0 +1,97 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var acceleratedmobilepageurl_v1;
(function (acceleratedmobilepageurl_v1) {
/**
* Accelerated Mobile Pages (AMP) URL API
*
* Retrieves the list of AMP URLs (and equivalent AMP Cache URLs) for a given
* list of public URL(s).
*
* @example
* const {google} = require('googleapis');
* const acceleratedmobilepageurl = google.acceleratedmobilepageurl('v1');
*
* @namespace acceleratedmobilepageurl
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Acceleratedmobilepageurl
*/
class Acceleratedmobilepageurl {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.ampUrls = new Resource$Ampurls(this);
}
getRoot() {
return this.root;
}
}
acceleratedmobilepageurl_v1.Acceleratedmobilepageurl = Acceleratedmobilepageurl;
class Resource$Ampurls {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
batchGet(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://acceleratedmobilepageurl.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/ampUrls:batchGet')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
acceleratedmobilepageurl_v1.Resource$Ampurls = Resource$Ampurls;
})(acceleratedmobilepageurl_v1 = exports.acceleratedmobilepageurl_v1 || (exports.acceleratedmobilepageurl_v1 = {}));
//# sourceMappingURL=v1.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../../../src/apis/acceleratedmobilepageurl/v1.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAIH,yDAA2H;AAE3H,yBAAyB;AACzB,6BAA6B;AAC7B,gCAAgC;AAChC,+BAA+B;AAC/B,+BAA+B;AAE/B,IAAiB,2BAA2B,CA2M3C;AA3MD,WAAiB,2BAA2B;IAK1C;;;;;;;;;;;;;;;OAeG;IACH,MAAa,wBAAwB;QAOnC,YAAY,OAAsB,EAAE,MAA2B;YAJ/D,SAAI,GAAG,IAAI,CAAC;YAKV,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAExB,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;KACF;IAlBY,oDAAwB,2BAkBpC,CAAA;IAsED,MAAa,gBAAgB;QAE3B,YAAY,IAA8B;YACxC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QA6BD,QAAQ,CACJ,gBACoD,EACpD,iBACoD,EACpD,QAA+D;YAEjE,IAAI,MAAM,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAqC,CAAC;YAC1E,IAAI,OAAO,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAkB,CAAC;YAEzD,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;gBAC1C,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM,GAAG,EAAsC,CAAC;gBAChD,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACT,OAAO,CAAC,OAAO,IAAI,kDAAkD,CAAC;YAC1E,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAClB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,sBAAsB,CAAC;yBAC7B,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;oBACvC,MAAM,EAAE,MAAM;iBACf,EACD,OAAO,CAAC;gBACZ,MAAM;gBACN,cAAc,EAAE,EAAE;gBAClB,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;aACxB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,oCAAgB,CAAiC,UAAU,EAAE,QAAQ,CAAC,CAAC;aACxE;iBAAM;gBACL,OAAO,oCAAgB,CAAiC,UAAU,CAAC,CAAC;aACrE;QACH,CAAC;KACF;IAhFY,4CAAgB,mBAgF5B,CAAA;AAcH,CAAC,EA3MgB,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QA2M3C"}

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/adexchangebuyer
> Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.
## Installation
```sh
$ npm install @google/adexchangebuyer
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,14 @@
import { adexchangebuyer_v1_2 } from './v1.2';
import { adexchangebuyer_v1_3 } from './v1.3';
import { adexchangebuyer_v1_4 } from './v1.4';
export declare const VERSIONS: {
'v1.2': typeof adexchangebuyer_v1_2.Adexchangebuyer;
'v1.3': typeof adexchangebuyer_v1_3.Adexchangebuyer;
'v1.4': typeof adexchangebuyer_v1_4.Adexchangebuyer;
};
export declare function adexchangebuyer(version: 'v1_2'): adexchangebuyer_v1_2.Adexchangebuyer;
export declare function adexchangebuyer(options: adexchangebuyer_v1_2.Options): adexchangebuyer_v1_2.Adexchangebuyer;
export declare function adexchangebuyer(version: 'v1_3'): adexchangebuyer_v1_3.Adexchangebuyer;
export declare function adexchangebuyer(options: adexchangebuyer_v1_3.Options): adexchangebuyer_v1_3.Adexchangebuyer;
export declare function adexchangebuyer(version: 'v1_4'): adexchangebuyer_v1_4.Adexchangebuyer;
export declare function adexchangebuyer(options: adexchangebuyer_v1_4.Options): adexchangebuyer_v1_4.Adexchangebuyer;

View File

@ -0,0 +1,29 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_2_1 = require("./v1.2");
const v1_3_1 = require("./v1.3");
const v1_4_1 = require("./v1.4");
exports.VERSIONS = {
'v1.2': v1_2_1.adexchangebuyer_v1_2.Adexchangebuyer,
'v1.3': v1_3_1.adexchangebuyer_v1_3.Adexchangebuyer,
'v1.4': v1_4_1.adexchangebuyer_v1_4.Adexchangebuyer,
};
function adexchangebuyer(versionOrOptions) {
return googleapis_common_1.getAPI('adexchangebuyer', versionOrOptions, exports.VERSIONS, this);
}
exports.adexchangebuyer = adexchangebuyer;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/adexchangebuyer/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,iCAA4C;AAC5C,iCAA4C;AAC5C,iCAA4C;AAE/B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE,2BAAoB,CAAC,eAAe;IAC5C,MAAM,EAAE,2BAAoB,CAAC,eAAe;IAC5C,MAAM,EAAE,2BAAoB,CAAC,eAAe;CAC7C,CAAC;AAcF,SAAgB,eAAe,CAK3B,gBAEgE;IAClE,OAAO,0BAAM,CAAI,iBAAiB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACxE,CAAC;AATD,0CASC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/adexchangebuyer",
"version": "0.1.0",
"description": "adexchangebuyer",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

View File

@ -0,0 +1,455 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace adexchangebuyer_v1_2 {
interface Options extends GlobalOptions {
version: 'v1_2';
}
/**
* Ad Exchange Buyer API
*
* Accesses your bidding-account information, submits creatives for
* validation, finds available direct deals, and retrieves performance
* reports.
*
* @example
* const {google} = require('googleapis');
* const adexchangebuyer = google.adexchangebuyer('v1.2');
*
* @namespace adexchangebuyer
* @type {Function}
* @version v1.2
* @variation v1.2
* @param {object=} options Options for Adexchangebuyer
*/
class Adexchangebuyer {
_options: GlobalOptions;
google?: GoogleConfigurable;
root: this;
accounts: Resource$Accounts;
creatives: Resource$Creatives;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
getRoot(): this;
}
/**
* Configuration data for an Ad Exchange buyer account.
*/
interface Schema$Account {
/**
* Your bidder locations that have distinct URLs.
*/
bidderLocation?: any[];
/**
* The nid parameter value used in cookie match requests. Please contact
* your technical account manager if you need to change this.
*/
cookieMatchingNid?: string;
/**
* The base URL used in cookie match requests.
*/
cookieMatchingUrl?: string;
/**
* Account id.
*/
id?: number;
/**
* Resource type.
*/
kind?: string;
/**
* The maximum number of active creatives that an account can have, where a
* creative is active if it was inserted or bid with in the last 30 days.
* Please contact your technical account manager if you need to change this.
*/
maximumActiveCreatives?: number;
/**
* The sum of all bidderLocation.maximumQps values cannot exceed this.
* Please contact your technical account manager if you need to change this.
*/
maximumTotalQps?: number;
/**
* The number of creatives that this account inserted or bid with in the
* last 30 days.
*/
numberActiveCreatives?: number;
}
/**
* An account feed lists Ad Exchange buyer accounts that the user has access
* to. Each entry in the feed corresponds to a single buyer account.
*/
interface Schema$AccountsList {
/**
* A list of accounts.
*/
items?: Schema$Account[];
/**
* Resource type.
*/
kind?: string;
}
/**
* A creative and its classification data.
*/
interface Schema$Creative {
/**
* Account id.
*/
accountId?: number;
/**
* Detected advertiser id, if any. Read-only. This field should not be set
* in requests.
*/
advertiserId?: string[];
/**
* The name of the company being advertised in the creative.
*/
advertiserName?: string;
/**
* The agency id for this creative.
*/
agencyId?: string;
/**
* The last upload timestamp of this creative if it was uploaded via API.
* Read-only. The value of this field is generated, and will be ignored for
* uploads. (formatted RFC 3339 timestamp).
*/
apiUploadTimestamp?: string;
/**
* All attributes for the ads that may be shown from this snippet.
*/
attribute?: number[];
/**
* A buyer-specific id identifying the creative in this ad.
*/
buyerCreativeId?: string;
/**
* The set of destination urls for the snippet.
*/
clickThroughUrl?: string[];
/**
* Shows any corrections that were applied to this creative. Read-only. This
* field should not be set in requests.
*/
corrections?: any[];
/**
* The reasons for disapproval, if any. Note that not all disapproval
* reasons may be categorized, so it is possible for the creative to have a
* status of DISAPPROVED with an empty list for disapproval_reasons. In this
* case, please reach out to your TAM to help debug the issue. Read-only.
* This field should not be set in requests.
*/
disapprovalReasons?: any[];
/**
* The filtering reasons for the creative. Read-only. This field should not
* be set in requests.
*/
filteringReasons?: any;
/**
* Ad height.
*/
height?: number;
/**
* The HTML snippet that displays the ad when inserted in the web page. If
* set, videoURL should not be set.
*/
HTMLSnippet?: string;
/**
* The set of urls to be called to record an impression.
*/
impressionTrackingUrl?: string[];
/**
* Resource type.
*/
kind?: string;
/**
* Detected product categories, if any. Read-only. This field should not be
* set in requests.
*/
productCategories?: number[];
/**
* All restricted categories for the ads that may be shown from this
* snippet.
*/
restrictedCategories?: number[];
/**
* Detected sensitive categories, if any. Read-only. This field should not
* be set in requests.
*/
sensitiveCategories?: number[];
/**
* Creative serving status. Read-only. This field should not be set in
* requests.
*/
status?: string;
/**
* All vendor types for the ads that may be shown from this snippet.
*/
vendorType?: number[];
/**
* The version for this creative. Read-only. This field should not be set in
* requests.
*/
version?: number;
/**
* The url to fetch a video ad. If set, HTMLSnippet should not be set.
*/
videoURL?: string;
/**
* Ad width.
*/
width?: number;
}
/**
* The creatives feed lists the active creatives for the Ad Exchange buyer
* accounts that the user has access to. Each entry in the feed corresponds to
* a single creative.
*/
interface Schema$CreativesList {
/**
* A list of creatives.
*/
items?: Schema$Creative[];
/**
* Resource type.
*/
kind?: string;
/**
* Continuation token used to page through creatives. To retrieve the next
* page of results, set the next request&#39;s &quot;pageToken&quot; value
* to this.
*/
nextPageToken?: string;
}
class Resource$Accounts {
root: Adexchangebuyer;
constructor(root: Adexchangebuyer);
getRoot(): Adexchangebuyer;
/**
* adexchangebuyer.accounts.get
* @desc Gets one account by ID.
* @alias adexchangebuyer.accounts.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer} params.id The account id
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Accounts$Get, options?: MethodOptions): AxiosPromise<Schema$Account>;
get(params: Params$Resource$Accounts$Get, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
get(params: Params$Resource$Accounts$Get, callback: BodyResponseCallback<Schema$Account>): void;
get(callback: BodyResponseCallback<Schema$Account>): void;
/**
* adexchangebuyer.accounts.list
* @desc Retrieves the authenticated user's list of accounts.
* @alias adexchangebuyer.accounts.list
* @memberOf! ()
*
* @param {object=} params Parameters for request
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Accounts$List, options?: MethodOptions): AxiosPromise<Schema$AccountsList>;
list(params: Params$Resource$Accounts$List, options: MethodOptions | BodyResponseCallback<Schema$AccountsList>, callback: BodyResponseCallback<Schema$AccountsList>): void;
list(params: Params$Resource$Accounts$List, callback: BodyResponseCallback<Schema$AccountsList>): void;
list(callback: BodyResponseCallback<Schema$AccountsList>): void;
/**
* adexchangebuyer.accounts.patch
* @desc Updates an existing account. This method supports patch semantics.
* @alias adexchangebuyer.accounts.patch
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer} params.id The account id
* @param {().Account} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
patch(params?: Params$Resource$Accounts$Patch, options?: MethodOptions): AxiosPromise<Schema$Account>;
patch(params: Params$Resource$Accounts$Patch, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
patch(params: Params$Resource$Accounts$Patch, callback: BodyResponseCallback<Schema$Account>): void;
patch(callback: BodyResponseCallback<Schema$Account>): void;
/**
* adexchangebuyer.accounts.update
* @desc Updates an existing account.
* @alias adexchangebuyer.accounts.update
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer} params.id The account id
* @param {().Account} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
update(params?: Params$Resource$Accounts$Update, options?: MethodOptions): AxiosPromise<Schema$Account>;
update(params: Params$Resource$Accounts$Update, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
update(params: Params$Resource$Accounts$Update, callback: BodyResponseCallback<Schema$Account>): void;
update(callback: BodyResponseCallback<Schema$Account>): void;
}
interface Params$Resource$Accounts$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The account id
*/
id?: number;
}
interface Params$Resource$Accounts$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
}
interface Params$Resource$Accounts$Patch {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The account id
*/
id?: number;
/**
* Request body metadata
*/
requestBody?: Schema$Account;
}
interface Params$Resource$Accounts$Update {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The account id
*/
id?: number;
/**
* Request body metadata
*/
requestBody?: Schema$Account;
}
class Resource$Creatives {
root: Adexchangebuyer;
constructor(root: Adexchangebuyer);
getRoot(): Adexchangebuyer;
/**
* adexchangebuyer.creatives.get
* @desc Gets the status for a single creative. A creative will be available
* 30-40 minutes after submission.
* @alias adexchangebuyer.creatives.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer} params.accountId The id for the account that will serve this creative.
* @param {string} params.buyerCreativeId The buyer-specific id for this creative.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Creatives$Get, options?: MethodOptions): AxiosPromise<Schema$Creative>;
get(params: Params$Resource$Creatives$Get, options: MethodOptions | BodyResponseCallback<Schema$Creative>, callback: BodyResponseCallback<Schema$Creative>): void;
get(params: Params$Resource$Creatives$Get, callback: BodyResponseCallback<Schema$Creative>): void;
get(callback: BodyResponseCallback<Schema$Creative>): void;
/**
* adexchangebuyer.creatives.insert
* @desc Submit a new creative.
* @alias adexchangebuyer.creatives.insert
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {().Creative} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
insert(params?: Params$Resource$Creatives$Insert, options?: MethodOptions): AxiosPromise<Schema$Creative>;
insert(params: Params$Resource$Creatives$Insert, options: MethodOptions | BodyResponseCallback<Schema$Creative>, callback: BodyResponseCallback<Schema$Creative>): void;
insert(params: Params$Resource$Creatives$Insert, callback: BodyResponseCallback<Schema$Creative>): void;
insert(callback: BodyResponseCallback<Schema$Creative>): void;
/**
* adexchangebuyer.creatives.list
* @desc Retrieves a list of the authenticated user's active creatives. A
* creative will be available 30-40 minutes after submission.
* @alias adexchangebuyer.creatives.list
* @memberOf! ()
*
* @param {object=} params Parameters for request
* @param {integer=} params.maxResults Maximum number of entries returned on one result page. If not set, the default is 100. Optional.
* @param {string=} params.pageToken A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.
* @param {string=} params.statusFilter When specified, only creatives having the given status are returned.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Creatives$List, options?: MethodOptions): AxiosPromise<Schema$CreativesList>;
list(params: Params$Resource$Creatives$List, options: MethodOptions | BodyResponseCallback<Schema$CreativesList>, callback: BodyResponseCallback<Schema$CreativesList>): void;
list(params: Params$Resource$Creatives$List, callback: BodyResponseCallback<Schema$CreativesList>): void;
list(callback: BodyResponseCallback<Schema$CreativesList>): void;
}
interface Params$Resource$Creatives$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The id for the account that will serve this creative.
*/
accountId?: number;
/**
* The buyer-specific id for this creative.
*/
buyerCreativeId?: string;
}
interface Params$Resource$Creatives$Insert {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Request body metadata
*/
requestBody?: Schema$Creative;
}
interface Params$Resource$Creatives$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Maximum number of entries returned on one result page. If not set, the
* default is 100. Optional.
*/
maxResults?: number;
/**
* A continuation token, used to page through ad clients. To retrieve the
* next page, set this parameter to the value of "nextPageToken" from the
* previous response. Optional.
*/
pageToken?: string;
/**
* When specified, only creatives having the given status are returned.
*/
statusFilter?: string;
}
}

View File

@ -0,0 +1,296 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var adexchangebuyer_v1_2;
(function (adexchangebuyer_v1_2) {
/**
* Ad Exchange Buyer API
*
* Accesses your bidding-account information, submits creatives for
* validation, finds available direct deals, and retrieves performance
* reports.
*
* @example
* const {google} = require('googleapis');
* const adexchangebuyer = google.adexchangebuyer('v1.2');
*
* @namespace adexchangebuyer
* @type {Function}
* @version v1.2
* @variation v1.2
* @param {object=} options Options for Adexchangebuyer
*/
class Adexchangebuyer {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.accounts = new Resource$Accounts(this);
this.creatives = new Resource$Creatives(this);
}
getRoot() {
return this.root;
}
}
adexchangebuyer_v1_2.Adexchangebuyer = Adexchangebuyer;
class Resource$Accounts {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/accounts/{id}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/accounts')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/accounts/{id}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH'
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/accounts/{id}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT'
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_2.Resource$Accounts = Resource$Accounts;
class Resource$Creatives {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.2/creatives/{accountId}/{buyerCreativeId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'buyerCreativeId'],
pathParams: ['accountId', 'buyerCreativeId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/creatives')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.2/creatives')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_2.Resource$Creatives = Resource$Creatives;
})(adexchangebuyer_v1_2 = exports.adexchangebuyer_v1_2 || (exports.adexchangebuyer_v1_2 = {}));
//# sourceMappingURL=v1.2.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,794 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var adexchangebuyer_v1_3;
(function (adexchangebuyer_v1_3) {
/**
* Ad Exchange Buyer API
*
* Accesses your bidding-account information, submits creatives for
* validation, finds available direct deals, and retrieves performance
* reports.
*
* @example
* const {google} = require('googleapis');
* const adexchangebuyer = google.adexchangebuyer('v1.3');
*
* @namespace adexchangebuyer
* @type {Function}
* @version v1.3
* @variation v1.3
* @param {object=} options Options for Adexchangebuyer
*/
class Adexchangebuyer {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.accounts = new Resource$Accounts(this);
this.billingInfo = new Resource$Billinginfo(this);
this.budget = new Resource$Budget(this);
this.creatives = new Resource$Creatives(this);
this.directDeals = new Resource$Directdeals(this);
this.performanceReport = new Resource$Performancereport(this);
this.pretargetingConfig = new Resource$Pretargetingconfig(this);
}
getRoot() {
return this.root;
}
}
adexchangebuyer_v1_3.Adexchangebuyer = Adexchangebuyer;
class Resource$Accounts {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/accounts/{id}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/accounts')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/accounts/{id}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH'
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/accounts/{id}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT'
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Accounts = Resource$Accounts;
class Resource$Billinginfo {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/billinginfo/{accountId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/billinginfo')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Billinginfo = Resource$Billinginfo;
class Resource$Budget {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'billingId'],
pathParams: ['accountId', 'billingId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH'
}, options),
params,
requiredParams: ['accountId', 'billingId'],
pathParams: ['accountId', 'billingId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/billinginfo/{accountId}/{billingId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT'
}, options),
params,
requiredParams: ['accountId', 'billingId'],
pathParams: ['accountId', 'billingId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Budget = Resource$Budget;
class Resource$Creatives {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/creatives/{accountId}/{buyerCreativeId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'buyerCreativeId'],
pathParams: ['accountId', 'buyerCreativeId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/creatives')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/creatives')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Creatives = Resource$Creatives;
class Resource$Directdeals {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/directdeals/{id}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['id'],
pathParams: ['id'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/directdeals')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Directdeals = Resource$Directdeals;
class Resource$Performancereport {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adexchangebuyer/v1.3/performancereport')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'endDateTime', 'startDateTime'],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Performancereport = Resource$Performancereport;
class Resource$Pretargetingconfig {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE'
}, options),
params,
requiredParams: ['accountId', 'configId'],
pathParams: ['accountId', 'configId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'configId'],
pathParams: ['accountId', 'configId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH'
}, options),
params,
requiredParams: ['accountId', 'configId'],
pathParams: ['accountId', 'configId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adexchangebuyer/v1.3/pretargetingconfigs/{accountId}/{configId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT'
}, options),
params,
requiredParams: ['accountId', 'configId'],
pathParams: ['accountId', 'configId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexchangebuyer_v1_3.Resource$Pretargetingconfig = Resource$Pretargetingconfig;
})(adexchangebuyer_v1_3 = exports.adexchangebuyer_v1_3 || (exports.adexchangebuyer_v1_3 = {}));
//# sourceMappingURL=v1.3.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/adexchangebuyer2
> Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.
## Installation
```sh
$ npm install @google/adexchangebuyer2
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,6 @@
import { adexchangebuyer2_v2beta1 } from './v2beta1';
export declare const VERSIONS: {
'v2beta1': typeof adexchangebuyer2_v2beta1.Adexchangebuyer2;
};
export declare function adexchangebuyer2(version: 'v2beta1'): adexchangebuyer2_v2beta1.Adexchangebuyer2;
export declare function adexchangebuyer2(options: adexchangebuyer2_v2beta1.Options): adexchangebuyer2_v2beta1.Adexchangebuyer2;

View File

@ -0,0 +1,25 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v2beta1_1 = require("./v2beta1");
exports.VERSIONS = {
'v2beta1': v2beta1_1.adexchangebuyer2_v2beta1.Adexchangebuyer2,
};
function adexchangebuyer2(versionOrOptions) {
return googleapis_common_1.getAPI('adexchangebuyer2', versionOrOptions, exports.VERSIONS, this);
}
exports.adexchangebuyer2 = adexchangebuyer2;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/adexchangebuyer2/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,uCAAmD;AAEtC,QAAA,QAAQ,GAAG;IACtB,SAAS,EAAE,kCAAwB,CAAC,gBAAgB;CACrD,CAAC;AAMF,SAAgB,gBAAgB,CAE5B,gBAA4D;IAC9D,OAAO,0BAAM,CAAI,kBAAkB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACzE,CAAC;AAJD,4CAIC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/adexchangebuyer2",
"version": "0.1.0",
"description": "adexchangebuyer2",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/adexperiencereport
> View Ad Experience Report data, and get a list of sites that have a significant number of annoying ads.
## Installation
```sh
$ npm install @google/adexperiencereport
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,6 @@
import { adexperiencereport_v1 } from './v1';
export declare const VERSIONS: {
'v1': typeof adexperiencereport_v1.Adexperiencereport;
};
export declare function adexperiencereport(version: 'v1'): adexperiencereport_v1.Adexperiencereport;
export declare function adexperiencereport(options: adexperiencereport_v1.Options): adexperiencereport_v1.Adexperiencereport;

View File

@ -0,0 +1,25 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
exports.VERSIONS = {
'v1': v1_1.adexperiencereport_v1.Adexperiencereport,
};
function adexperiencereport(versionOrOptions) {
return googleapis_common_1.getAPI('adexperiencereport', versionOrOptions, exports.VERSIONS, this);
}
exports.adexperiencereport = adexperiencereport;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/adexperiencereport/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,6BAA2C;AAE9B,QAAA,QAAQ,GAAG;IACtB,IAAI,EAAE,0BAAqB,CAAC,kBAAkB;CAC/C,CAAC;AAMF,SACA,kBAAkB,CAEd,gBAAoD;IACtD,OAAO,0BAAM,CAAI,oBAAoB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAC3E,CAAC;AALD,gDAKC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/adexperiencereport",
"version": "0.1.0",
"description": "adexperiencereport",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

View File

@ -0,0 +1,172 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace adexperiencereport_v1 {
interface Options extends GlobalOptions {
version: 'v1';
}
/**
* Ad Experience Report API
*
* View Ad Experience Report data, and get a list of sites that have a
* significant number of annoying ads.
*
* @example
* const {google} = require('googleapis');
* const adexperiencereport = google.adexperiencereport('v1');
*
* @namespace adexperiencereport
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Adexperiencereport
*/
class Adexperiencereport {
_options: GlobalOptions;
google?: GoogleConfigurable;
root: this;
sites: Resource$Sites;
violatingSites: Resource$Violatingsites;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
getRoot(): this;
}
/**
* Summary of the ad experience rating of a site for a specific platform.
*/
interface Schema$PlatformSummary {
/**
* The status of the site reviewed for the Better Ads Standards.
*/
betterAdsStatus?: string;
/**
* The date on which ad filtering begins.
*/
enforcementTime?: string;
/**
* The ad filtering status of the site.
*/
filterStatus?: string;
/**
* The last time that the site changed status.
*/
lastChangeTime?: string;
/**
* The assigned regions for the site and platform.
*/
region?: string[];
/**
* A link that leads to a full ad experience report.
*/
reportUrl?: string;
/**
* Whether the site is currently under review.
*/
underReview?: boolean;
}
/**
* Response message for GetSiteSummary.
*/
interface Schema$SiteSummaryResponse {
/**
* Summary for the desktop review of the site.
*/
desktopSummary?: Schema$PlatformSummary;
/**
* Summary for the mobile review of the site.
*/
mobileSummary?: Schema$PlatformSummary;
/**
* The name of the site reviewed.
*/
reviewedSite?: string;
}
/**
* Response message for ListViolatingSites.
*/
interface Schema$ViolatingSitesResponse {
/**
* A list of summaries of violating sites.
*/
violatingSites?: Schema$SiteSummaryResponse[];
}
class Resource$Sites {
root: Adexperiencereport;
constructor(root: Adexperiencereport);
getRoot(): Adexperiencereport;
/**
* adexperiencereport.sites.get
* @desc Gets a summary of the ad experience rating of a site.
* @alias adexperiencereport.sites.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name The required site name. It should be the site property whose ad experiences may have been reviewed, and it should be URL-encoded. For example, sites/https%3A%2F%2Fwww.google.com. The server will return an error of BAD_REQUEST if this field is not filled in. Note that if the site property is not yet verified in Search Console, the reportUrl field returned by the API will lead to the verification page, prompting the user to go through that process before they can gain access to the Ad Experience Report.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Sites$Get, options?: MethodOptions): AxiosPromise<Schema$SiteSummaryResponse>;
get(params: Params$Resource$Sites$Get, options: MethodOptions | BodyResponseCallback<Schema$SiteSummaryResponse>, callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
get(params: Params$Resource$Sites$Get, callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
get(callback: BodyResponseCallback<Schema$SiteSummaryResponse>): void;
}
interface Params$Resource$Sites$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The required site name. It should be the site property whose ad
* experiences may have been reviewed, and it should be URL-encoded. For
* example, sites/https%3A%2F%2Fwww.google.com. The server will return an
* error of BAD_REQUEST if this field is not filled in. Note that if the
* site property is not yet verified in Search Console, the reportUrl field
* returned by the API will lead to the verification page, prompting the
* user to go through that process before they can gain access to the Ad
* Experience Report.
*/
name?: string;
}
class Resource$Violatingsites {
root: Adexperiencereport;
constructor(root: Adexperiencereport);
getRoot(): Adexperiencereport;
/**
* adexperiencereport.violatingSites.list
* @desc Lists sites with Ad Experience Report statuses of "Failing" or
* "Warning".
* @alias adexperiencereport.violatingSites.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Violatingsites$List, options?: MethodOptions): AxiosPromise<Schema$ViolatingSitesResponse>;
list(params: Params$Resource$Violatingsites$List, options: MethodOptions | BodyResponseCallback<Schema$ViolatingSitesResponse>, callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
list(params: Params$Resource$Violatingsites$List, callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
list(callback: BodyResponseCallback<Schema$ViolatingSitesResponse>): void;
}
interface Params$Resource$Violatingsites$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
}
}

View File

@ -0,0 +1,138 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var adexperiencereport_v1;
(function (adexperiencereport_v1) {
/**
* Ad Experience Report API
*
* View Ad Experience Report data, and get a list of sites that have a
* significant number of annoying ads.
*
* @example
* const {google} = require('googleapis');
* const adexperiencereport = google.adexperiencereport('v1');
*
* @namespace adexperiencereport
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Adexperiencereport
*/
class Adexperiencereport {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.sites = new Resource$Sites(this);
this.violatingSites = new Resource$Violatingsites(this);
}
getRoot() {
return this.root;
}
}
adexperiencereport_v1.Adexperiencereport = Adexperiencereport;
class Resource$Sites {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adexperiencereport.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexperiencereport_v1.Resource$Sites = Resource$Sites;
class Resource$Violatingsites {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://adexperiencereport.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1/violatingSites')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adexperiencereport_v1.Resource$Violatingsites = Resource$Violatingsites;
})(adexperiencereport_v1 = exports.adexperiencereport_v1 || (exports.adexperiencereport_v1 = {}));
//# sourceMappingURL=v1.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../../../src/apis/adexperiencereport/v1.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAIH,yDAA2H;AAE3H,yBAAyB;AACzB,6BAA6B;AAC7B,gCAAgC;AAChC,+BAA+B;AAC/B,+BAA+B;AAE/B,IAAiB,qBAAqB,CA4RrC;AA5RD,WAAiB,qBAAqB;IAKpC;;;;;;;;;;;;;;;OAeG;IACH,MAAa,kBAAkB;QAQ7B,YAAY,OAAsB,EAAE,MAA2B;YAL/D,SAAI,GAAG,IAAI,CAAC;YAMV,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAExB,IAAI,CAAC,KAAK,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;YACtC,IAAI,CAAC,cAAc,GAAG,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;KACF;IApBY,wCAAkB,qBAoB9B,CAAA;IA+DD,MAAa,cAAc;QAEzB,YAAY,IAAwB;YAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QAuBD,GAAG,CAAC,gBACgD,EAChD,iBACgD,EAChD,QAA2D;YAE7D,IAAI,MAAM,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAA8B,CAAC;YACnE,IAAI,OAAO,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAkB,CAAC;YAEzD,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;gBAC1C,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM,GAAG,EAA+B,CAAC;gBACzC,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACT,OAAO,CAAC,OAAO,IAAI,4CAA4C,CAAC;YACpE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAClB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,aAAa,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;oBAC5D,MAAM,EAAE,KAAK;iBACd,EACD,OAAO,CAAC;gBACZ,MAAM;gBACN,cAAc,EAAE,CAAC,MAAM,CAAC;gBACxB,UAAU,EAAE,CAAC,MAAM,CAAC;gBACpB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;aACxB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,oCAAgB,CAA6B,UAAU,EAAE,QAAQ,CAAC,CAAC;aACpE;iBAAM;gBACL,OAAO,oCAAgB,CAA6B,UAAU,CAAC,CAAC;aACjE;QACH,CAAC;KACF;IAxEY,oCAAc,iBAwE1B,CAAA;IAsBD,MAAa,uBAAuB;QAElC,YAAY,IAAwB;YAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QA0BD,IAAI,CACA,gBACmD,EACnD,iBACmD,EACnD,QAA8D;YAEhE,IAAI,MAAM,GACN,CAAC,gBAAgB,IAAI,EAAE,CAAwC,CAAC;YACpE,IAAI,OAAO,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAkB,CAAC;YAEzD,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;gBAC1C,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM,GAAG,EAAyC,CAAC;gBACnD,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACT,OAAO,CAAC,OAAO,IAAI,4CAA4C,CAAC;YACpE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAClB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,oBAAoB,CAAC;yBAC3B,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;oBACvC,MAAM,EAAE,KAAK;iBACd,EACD,OAAO,CAAC;gBACZ,MAAM;gBACN,cAAc,EAAE,EAAE;gBAClB,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;aACxB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,oCAAgB,CAAgC,UAAU,EAAE,QAAQ,CAAC,CAAC;aACvE;iBAAM;gBACL,OAAO,oCAAgB,CAAgC,UAAU,CAAC,CAAC;aACpE;QACH,CAAC;KACF;IA9EY,6CAAuB,0BA8EnC,CAAA;AAQH,CAAC,EA5RgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QA4RrC"}

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/admin
> Transfers user data from one user to another.
## Installation
```sh
$ npm install @google/admin
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,368 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace admin_datatransfer_v1 {
interface Options extends GlobalOptions {
version: 'datatransfer_v1';
}
/**
* Admin Data Transfer API
*
* Transfers user data from one user to another.
*
* @example
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_v1');
*
* @namespace admin
* @type {Function}
* @version datatransfer_v1
* @variation datatransfer_v1
* @param {object=} options Options for Admin
*/
class Admin {
_options: GlobalOptions;
google?: GoogleConfigurable;
root: this;
applications: Resource$Applications;
transfers: Resource$Transfers;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
getRoot(): this;
}
/**
* The JSON template for an Application resource.
*/
interface Schema$Application {
/**
* Etag of the resource.
*/
etag?: string;
/**
* The application&#39;s ID.
*/
id?: string;
/**
* Identifies the resource as a DataTransfer Application Resource.
*/
kind?: string;
/**
* The application&#39;s name.
*/
name?: string;
/**
* The list of all possible transfer parameters for this application. These
* parameters can be used to select the data of the user in this application
* to be transfered.
*/
transferParams?: Schema$ApplicationTransferParam[];
}
/**
* Template to map fields of ApplicationDataTransfer resource.
*/
interface Schema$ApplicationDataTransfer {
/**
* The application&#39;s ID.
*/
applicationId?: string;
/**
* The transfer parameters for the application. These parameters are used to
* select the data which will get transfered in context of this application.
*/
applicationTransferParams?: Schema$ApplicationTransferParam[];
/**
* Current status of transfer for this application. (Read-only)
*/
applicationTransferStatus?: string;
}
/**
* Template for a collection of Applications.
*/
interface Schema$ApplicationsListResponse {
/**
* List of applications that support data transfer and are also installed
* for the customer.
*/
applications?: Schema$Application[];
/**
* ETag of the resource.
*/
etag?: string;
/**
* Identifies the resource as a collection of Applications.
*/
kind?: string;
/**
* Continuation token which will be used to specify next page in list API.
*/
nextPageToken?: string;
}
/**
* Template for application transfer parameters.
*/
interface Schema$ApplicationTransferParam {
/**
* The type of the transfer parameter. eg: &#39;PRIVACY_LEVEL&#39;
*/
key?: string;
/**
* The value of the coressponding transfer parameter. eg: &#39;PRIVATE&#39;
* or &#39;SHARED&#39;
*/
value?: string[];
}
/**
* The JSON template for a DataTransfer resource.
*/
interface Schema$DataTransfer {
/**
* List of per application data transfer resources. It contains data
* transfer details of the applications associated with this transfer
* resource. Note that this list is also used to specify the applications
* for which data transfer has to be done at the time of the transfer
* resource creation.
*/
applicationDataTransfers?: Schema$ApplicationDataTransfer[];
/**
* ETag of the resource.
*/
etag?: string;
/**
* The transfer&#39;s ID (Read-only).
*/
id?: string;
/**
* Identifies the resource as a DataTransfer request.
*/
kind?: string;
/**
* ID of the user to whom the data is being transfered.
*/
newOwnerUserId?: string;
/**
* ID of the user whose data is being transfered.
*/
oldOwnerUserId?: string;
/**
* Overall transfer status (Read-only).
*/
overallTransferStatusCode?: string;
/**
* The time at which the data transfer was requested (Read-only).
*/
requestTime?: string;
}
/**
* Template for a collection of DataTransfer resources.
*/
interface Schema$DataTransfersListResponse {
/**
* List of data transfer requests.
*/
dataTransfers?: Schema$DataTransfer[];
/**
* ETag of the resource.
*/
etag?: string;
/**
* Identifies the resource as a collection of data transfer requests.
*/
kind?: string;
/**
* Continuation token which will be used to specify next page in list API.
*/
nextPageToken?: string;
}
class Resource$Applications {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* datatransfer.applications.get
* @desc Retrieves information about an application for the given
* application ID.
* @alias datatransfer.applications.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.applicationId ID of the application resource to be retrieved.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Applications$Get, options?: MethodOptions): AxiosPromise<Schema$Application>;
get(params: Params$Resource$Applications$Get, options: MethodOptions | BodyResponseCallback<Schema$Application>, callback: BodyResponseCallback<Schema$Application>): void;
get(params: Params$Resource$Applications$Get, callback: BodyResponseCallback<Schema$Application>): void;
get(callback: BodyResponseCallback<Schema$Application>): void;
/**
* datatransfer.applications.list
* @desc Lists the applications available for data transfer for a customer.
* @alias datatransfer.applications.list
* @memberOf! ()
*
* @param {object=} params Parameters for request
* @param {string=} params.customerId Immutable ID of the Google Apps account.
* @param {integer=} params.maxResults Maximum number of results to return. Default is 100.
* @param {string=} params.pageToken Token to specify next page in the list.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Applications$List, options?: MethodOptions): AxiosPromise<Schema$ApplicationsListResponse>;
list(params: Params$Resource$Applications$List, options: MethodOptions | BodyResponseCallback<Schema$ApplicationsListResponse>, callback: BodyResponseCallback<Schema$ApplicationsListResponse>): void;
list(params: Params$Resource$Applications$List, callback: BodyResponseCallback<Schema$ApplicationsListResponse>): void;
list(callback: BodyResponseCallback<Schema$ApplicationsListResponse>): void;
}
interface Params$Resource$Applications$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the application resource to be retrieved.
*/
applicationId?: string;
}
interface Params$Resource$Applications$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Immutable ID of the Google Apps account.
*/
customerId?: string;
/**
* Maximum number of results to return. Default is 100.
*/
maxResults?: number;
/**
* Token to specify next page in the list.
*/
pageToken?: string;
}
class Resource$Transfers {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* datatransfer.transfers.get
* @desc Retrieves a data transfer request by its resource ID.
* @alias datatransfer.transfers.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.dataTransferId ID of the resource to be retrieved. This is returned in the response from the insert method.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Transfers$Get, options?: MethodOptions): AxiosPromise<Schema$DataTransfer>;
get(params: Params$Resource$Transfers$Get, options: MethodOptions | BodyResponseCallback<Schema$DataTransfer>, callback: BodyResponseCallback<Schema$DataTransfer>): void;
get(params: Params$Resource$Transfers$Get, callback: BodyResponseCallback<Schema$DataTransfer>): void;
get(callback: BodyResponseCallback<Schema$DataTransfer>): void;
/**
* datatransfer.transfers.insert
* @desc Inserts a data transfer request.
* @alias datatransfer.transfers.insert
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {().DataTransfer} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
insert(params?: Params$Resource$Transfers$Insert, options?: MethodOptions): AxiosPromise<Schema$DataTransfer>;
insert(params: Params$Resource$Transfers$Insert, options: MethodOptions | BodyResponseCallback<Schema$DataTransfer>, callback: BodyResponseCallback<Schema$DataTransfer>): void;
insert(params: Params$Resource$Transfers$Insert, callback: BodyResponseCallback<Schema$DataTransfer>): void;
insert(callback: BodyResponseCallback<Schema$DataTransfer>): void;
/**
* datatransfer.transfers.list
* @desc Lists the transfers for a customer by source user, destination
* user, or status.
* @alias datatransfer.transfers.list
* @memberOf! ()
*
* @param {object=} params Parameters for request
* @param {string=} params.customerId Immutable ID of the Google Apps account.
* @param {integer=} params.maxResults Maximum number of results to return. Default is 100.
* @param {string=} params.newOwnerUserId Destination user's profile ID.
* @param {string=} params.oldOwnerUserId Source user's profile ID.
* @param {string=} params.pageToken Token to specify the next page in the list.
* @param {string=} params.status Status of the transfer.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Transfers$List, options?: MethodOptions): AxiosPromise<Schema$DataTransfersListResponse>;
list(params: Params$Resource$Transfers$List, options: MethodOptions | BodyResponseCallback<Schema$DataTransfersListResponse>, callback: BodyResponseCallback<Schema$DataTransfersListResponse>): void;
list(params: Params$Resource$Transfers$List, callback: BodyResponseCallback<Schema$DataTransfersListResponse>): void;
list(callback: BodyResponseCallback<Schema$DataTransfersListResponse>): void;
}
interface Params$Resource$Transfers$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* ID of the resource to be retrieved. This is returned in the response from
* the insert method.
*/
dataTransferId?: string;
}
interface Params$Resource$Transfers$Insert {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Request body metadata
*/
requestBody?: Schema$DataTransfer;
}
interface Params$Resource$Transfers$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Immutable ID of the Google Apps account.
*/
customerId?: string;
/**
* Maximum number of results to return. Default is 100.
*/
maxResults?: number;
/**
* Destination user's profile ID.
*/
newOwnerUserId?: string;
/**
* Source user's profile ID.
*/
oldOwnerUserId?: string;
/**
* Token to specify the next page in the list.
*/
pageToken?: string;
/**
* Status of the transfer.
*/
status?: string;
}
}

View File

@ -0,0 +1,233 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var admin_datatransfer_v1;
(function (admin_datatransfer_v1) {
/**
* Admin Data Transfer API
*
* Transfers user data from one user to another.
*
* @example
* const {google} = require('googleapis');
* const admin = google.admin('datatransfer_v1');
*
* @namespace admin
* @type {Function}
* @version datatransfer_v1
* @variation datatransfer_v1
* @param {object=} options Options for Admin
*/
class Admin {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.applications = new Resource$Applications(this);
this.transfers = new Resource$Transfers(this);
}
getRoot() {
return this.root;
}
}
admin_datatransfer_v1.Admin = Admin;
class Resource$Applications {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/datatransfer/v1/applications/{applicationId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['applicationId'],
pathParams: ['applicationId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/applications')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
admin_datatransfer_v1.Resource$Applications = Resource$Applications;
class Resource$Transfers {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/datatransfer/v1/transfers/{dataTransferId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['dataTransferId'],
pathParams: ['dataTransferId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
admin_datatransfer_v1.Resource$Transfers = Resource$Transfers;
})(admin_datatransfer_v1 = exports.admin_datatransfer_v1 || (exports.admin_datatransfer_v1 = {}));
//# sourceMappingURL=datatransfer_v1.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
import { admin_datatransfer_v1 } from './datatransfer_v1';
import { admin_directory_v1 } from './directory_v1';
import { admin_reports_v1 } from './reports_v1';
export declare const VERSIONS: {
'datatransfer_v1': typeof admin_datatransfer_v1.Admin;
'directory_v1': typeof admin_directory_v1.Admin;
'reports_v1': typeof admin_reports_v1.Admin;
};
export declare function admin(version: 'datatransfer_v1'): admin_datatransfer_v1.Admin;
export declare function admin(options: admin_datatransfer_v1.Options): admin_datatransfer_v1.Admin;
export declare function admin(version: 'directory_v1'): admin_directory_v1.Admin;
export declare function admin(options: admin_directory_v1.Options): admin_directory_v1.Admin;
export declare function admin(version: 'reports_v1'): admin_reports_v1.Admin;
export declare function admin(options: admin_reports_v1.Options): admin_reports_v1.Admin;

View File

@ -0,0 +1,29 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const datatransfer_v1_1 = require("./datatransfer_v1");
const directory_v1_1 = require("./directory_v1");
const reports_v1_1 = require("./reports_v1");
exports.VERSIONS = {
'datatransfer_v1': datatransfer_v1_1.admin_datatransfer_v1.Admin,
'directory_v1': directory_v1_1.admin_directory_v1.Admin,
'reports_v1': reports_v1_1.admin_reports_v1.Admin,
};
function admin(versionOrOptions) {
return googleapis_common_1.getAPI('admin', versionOrOptions, exports.VERSIONS, this);
}
exports.admin = admin;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/admin/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,uDAAwD;AACxD,iDAAkD;AAClD,6CAA8C;AAEjC,QAAA,QAAQ,GAAG;IACtB,iBAAiB,EAAE,uCAAqB,CAAC,KAAK;IAC9C,cAAc,EAAE,iCAAkB,CAAC,KAAK;IACxC,YAAY,EAAE,6BAAgB,CAAC,KAAK;CACrC,CAAC;AAWF,SAAgB,KAAK,CAIjB,gBAEgE;IAClE,OAAO,0BAAM,CAAI,OAAO,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAC9D,CAAC;AARD,sBAQC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/admin",
"version": "0.1.0",
"description": "admin",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

View File

@ -0,0 +1,579 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace admin_reports_v1 {
interface Options extends GlobalOptions {
version: 'reports_v1';
}
/**
* Admin Reports API
*
* Fetches reports for the administrators of G Suite customers about the
* usage, collaboration, security, and risk for their users.
*
* @example
* const {google} = require('googleapis');
* const admin = google.admin('reports_v1');
*
* @namespace admin
* @type {Function}
* @version reports_v1
* @variation reports_v1
* @param {object=} options Options for Admin
*/
class Admin {
_options: GlobalOptions;
google?: GoogleConfigurable;
root: this;
activities: Resource$Activities;
channels: Resource$Channels;
customerUsageReports: Resource$Customerusagereports;
entityUsageReports: Resource$Entityusagereports;
userUsageReport: Resource$Userusagereport;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
getRoot(): this;
}
/**
* JSON template for a collection of activites.
*/
interface Schema$Activities {
/**
* ETag of the resource.
*/
etag?: string;
/**
* Each record in read response.
*/
items?: Schema$Activity[];
/**
* Kind of list response this is.
*/
kind?: string;
/**
* Token for retrieving the next page
*/
nextPageToken?: string;
}
/**
* JSON template for the activity resource.
*/
interface Schema$Activity {
/**
* User doing the action.
*/
actor?: any;
/**
* ETag of the entry.
*/
etag?: string;
/**
* Activity events.
*/
events?: any[];
/**
* Unique identifier for each activity record.
*/
id?: any;
/**
* IP Address of the user doing the action.
*/
ipAddress?: string;
/**
* Kind of resource this is.
*/
kind?: string;
/**
* Domain of source customer.
*/
ownerDomain?: string;
}
/**
* An notification channel used to watch for resource changes.
*/
interface Schema$Channel {
/**
* The address where notifications are delivered for this channel.
*/
address?: string;
/**
* Date and time of notification channel expiration, expressed as a Unix
* timestamp, in milliseconds. Optional.
*/
expiration?: string;
/**
* A UUID or similar unique string that identifies this channel.
*/
id?: string;
/**
* Identifies this as a notification channel used to watch for changes to a
* resource. Value: the fixed string &quot;api#channel&quot;.
*/
kind?: string;
/**
* Additional parameters controlling delivery channel behavior. Optional.
*/
params?: any;
/**
* A Boolean value to indicate whether payload is wanted. Optional.
*/
payload?: boolean;
/**
* An opaque ID that identifies the resource being watched on this channel.
* Stable across different API versions.
*/
resourceId?: string;
/**
* A version-specific identifier for the watched resource.
*/
resourceUri?: string;
/**
* An arbitrary string delivered to the target address with each
* notification delivered over this channel. Optional.
*/
token?: string;
/**
* The type of delivery mechanism used for this channel.
*/
type?: string;
}
/**
* JSON template for a usage report.
*/
interface Schema$UsageReport {
/**
* The date to which the record belongs.
*/
date?: string;
/**
* Information about the type of the item.
*/
entity?: any;
/**
* ETag of the resource.
*/
etag?: string;
/**
* The kind of object.
*/
kind?: string;
/**
* Parameter value pairs for various applications.
*/
parameters?: any[];
}
/**
* JSON template for a collection of usage reports.
*/
interface Schema$UsageReports {
/**
* ETag of the resource.
*/
etag?: string;
/**
* The kind of object.
*/
kind?: string;
/**
* Token for retrieving the next page
*/
nextPageToken?: string;
/**
* Various application parameter records.
*/
usageReports?: Schema$UsageReport[];
/**
* Warnings if any.
*/
warnings?: any[];
}
class Resource$Activities {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* reports.activities.list
* @desc Retrieves a list of activities for a specific customer and
* application.
* @alias reports.activities.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string=} params.actorIpAddress IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses.
* @param {string} params.applicationName Application name for which the events are to be retrieved.
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string=} params.endTime Return events which occurred at or before this time.
* @param {string=} params.eventName Name of the event being queried.
* @param {string=} params.filters Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],...
* @param {integer=} params.maxResults Number of activity records to be shown in each page.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.startTime Return events which occurred at or after this time.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Activities$List, options?: MethodOptions): AxiosPromise<Schema$Activities>;
list(params: Params$Resource$Activities$List, options: MethodOptions | BodyResponseCallback<Schema$Activities>, callback: BodyResponseCallback<Schema$Activities>): void;
list(params: Params$Resource$Activities$List, callback: BodyResponseCallback<Schema$Activities>): void;
list(callback: BodyResponseCallback<Schema$Activities>): void;
/**
* reports.activities.watch
* @desc Push changes to activities
* @alias reports.activities.watch
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string=} params.actorIpAddress IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses.
* @param {string} params.applicationName Application name for which the events are to be retrieved.
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string=} params.endTime Return events which occurred at or before this time.
* @param {string=} params.eventName Name of the event being queried.
* @param {string=} params.filters Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],...
* @param {integer=} params.maxResults Number of activity records to be shown in each page.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.startTime Return events which occurred at or after this time.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users.
* @param {().Channel} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
watch(params?: Params$Resource$Activities$Watch, options?: MethodOptions): AxiosPromise<Schema$Channel>;
watch(params: Params$Resource$Activities$Watch, options: MethodOptions | BodyResponseCallback<Schema$Channel>, callback: BodyResponseCallback<Schema$Channel>): void;
watch(params: Params$Resource$Activities$Watch, callback: BodyResponseCallback<Schema$Channel>): void;
watch(callback: BodyResponseCallback<Schema$Channel>): void;
}
interface Params$Resource$Activities$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* IP Address of host where the event was performed. Supports both IPv4 and
* IPv6 addresses.
*/
actorIpAddress?: string;
/**
* Application name for which the events are to be retrieved.
*/
applicationName?: string;
/**
* Represents the customer for which the data is to be fetched.
*/
customerId?: string;
/**
* Return events which occurred at or before this time.
*/
endTime?: string;
/**
* Name of the event being queried.
*/
eventName?: string;
/**
* Event parameters in the form [parameter1 name][operator][parameter1
* value],[parameter2 name][operator][parameter2 value],...
*/
filters?: string;
/**
* Number of activity records to be shown in each page.
*/
maxResults?: number;
/**
* Token to specify next page.
*/
pageToken?: string;
/**
* Return events which occurred at or after this time.
*/
startTime?: string;
/**
* Represents the profile id or the user email for which the data should be
* filtered. When 'all' is specified as the userKey, it returns usageReports
* for all users.
*/
userKey?: string;
}
interface Params$Resource$Activities$Watch {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* IP Address of host where the event was performed. Supports both IPv4 and
* IPv6 addresses.
*/
actorIpAddress?: string;
/**
* Application name for which the events are to be retrieved.
*/
applicationName?: string;
/**
* Represents the customer for which the data is to be fetched.
*/
customerId?: string;
/**
* Return events which occurred at or before this time.
*/
endTime?: string;
/**
* Name of the event being queried.
*/
eventName?: string;
/**
* Event parameters in the form [parameter1 name][operator][parameter1
* value],[parameter2 name][operator][parameter2 value],...
*/
filters?: string;
/**
* Number of activity records to be shown in each page.
*/
maxResults?: number;
/**
* Token to specify next page.
*/
pageToken?: string;
/**
* Return events which occurred at or after this time.
*/
startTime?: string;
/**
* Represents the profile id or the user email for which the data should be
* filtered. When 'all' is specified as the userKey, it returns usageReports
* for all users.
*/
userKey?: string;
/**
* Request body metadata
*/
requestBody?: Schema$Channel;
}
class Resource$Channels {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* admin.channels.stop
* @desc Stop watching resources through this channel
* @alias admin.channels.stop
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {().Channel} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
stop(params?: Params$Resource$Channels$Stop, options?: MethodOptions): AxiosPromise<void>;
stop(params: Params$Resource$Channels$Stop, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
stop(params: Params$Resource$Channels$Stop, callback: BodyResponseCallback<void>): void;
stop(callback: BodyResponseCallback<void>): void;
}
interface Params$Resource$Channels$Stop {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Request body metadata
*/
requestBody?: Schema$Channel;
}
class Resource$Customerusagereports {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* reports.customerUsageReports.get
* @desc Retrieves a report which is a collection of properties / statistics
* for a specific customer.
* @alias reports.customerUsageReports.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string} params.date Represents the date in yyyy-mm-dd format for which the data is to be fetched.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.parameters Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Customerusagereports$Get, options?: MethodOptions): AxiosPromise<Schema$UsageReports>;
get(params: Params$Resource$Customerusagereports$Get, options: MethodOptions | BodyResponseCallback<Schema$UsageReports>, callback: BodyResponseCallback<Schema$UsageReports>): void;
get(params: Params$Resource$Customerusagereports$Get, callback: BodyResponseCallback<Schema$UsageReports>): void;
get(callback: BodyResponseCallback<Schema$UsageReports>): void;
}
interface Params$Resource$Customerusagereports$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Represents the customer for which the data is to be fetched.
*/
customerId?: string;
/**
* Represents the date in yyyy-mm-dd format for which the data is to be
* fetched.
*/
date?: string;
/**
* Token to specify next page.
*/
pageToken?: string;
/**
* Represents the application name, parameter name pairs to fetch in csv as
* app_name1:param_name1, app_name2:param_name2.
*/
parameters?: string;
}
class Resource$Entityusagereports {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* reports.entityUsageReports.get
* @desc Retrieves a report which is a collection of properties / statistics
* for a set of objects.
* @alias reports.entityUsageReports.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string} params.date Represents the date in yyyy-mm-dd format for which the data is to be fetched.
* @param {string} params.entityKey Represents the key of object for which the data should be filtered.
* @param {string} params.entityType Type of object. Should be one of - gplus_communities.
* @param {string=} params.filters Represents the set of filters including parameter operator value.
* @param {integer=} params.maxResults Maximum number of results to return. Maximum allowed is 1000
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.parameters Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Entityusagereports$Get, options?: MethodOptions): AxiosPromise<Schema$UsageReports>;
get(params: Params$Resource$Entityusagereports$Get, options: MethodOptions | BodyResponseCallback<Schema$UsageReports>, callback: BodyResponseCallback<Schema$UsageReports>): void;
get(params: Params$Resource$Entityusagereports$Get, callback: BodyResponseCallback<Schema$UsageReports>): void;
get(callback: BodyResponseCallback<Schema$UsageReports>): void;
}
interface Params$Resource$Entityusagereports$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Represents the customer for which the data is to be fetched.
*/
customerId?: string;
/**
* Represents the date in yyyy-mm-dd format for which the data is to be
* fetched.
*/
date?: string;
/**
* Represents the key of object for which the data should be filtered.
*/
entityKey?: string;
/**
* Type of object. Should be one of - gplus_communities.
*/
entityType?: string;
/**
* Represents the set of filters including parameter operator value.
*/
filters?: string;
/**
* Maximum number of results to return. Maximum allowed is 1000
*/
maxResults?: number;
/**
* Token to specify next page.
*/
pageToken?: string;
/**
* Represents the application name, parameter name pairs to fetch in csv as
* app_name1:param_name1, app_name2:param_name2.
*/
parameters?: string;
}
class Resource$Userusagereport {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* reports.userUsageReport.get
* @desc Retrieves a report which is a collection of properties / statistics
* for a set of users.
* @alias reports.userUsageReport.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string} params.date Represents the date in yyyy-mm-dd format for which the data is to be fetched.
* @param {string=} params.filters Represents the set of filters including parameter operator value.
* @param {integer=} params.maxResults Maximum number of results to return. Maximum allowed is 1000
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.parameters Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Userusagereport$Get, options?: MethodOptions): AxiosPromise<Schema$UsageReports>;
get(params: Params$Resource$Userusagereport$Get, options: MethodOptions | BodyResponseCallback<Schema$UsageReports>, callback: BodyResponseCallback<Schema$UsageReports>): void;
get(params: Params$Resource$Userusagereport$Get, callback: BodyResponseCallback<Schema$UsageReports>): void;
get(callback: BodyResponseCallback<Schema$UsageReports>): void;
}
interface Params$Resource$Userusagereport$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Represents the customer for which the data is to be fetched.
*/
customerId?: string;
/**
* Represents the date in yyyy-mm-dd format for which the data is to be
* fetched.
*/
date?: string;
/**
* Represents the set of filters including parameter operator value.
*/
filters?: string;
/**
* Maximum number of results to return. Maximum allowed is 1000
*/
maxResults?: number;
/**
* Token to specify next page.
*/
pageToken?: string;
/**
* Represents the application name, parameter name pairs to fetch in csv as
* app_name1:param_name1, app_name2:param_name2.
*/
parameters?: string;
/**
* Represents the profile id or the user email for which the data should be
* filtered.
*/
userKey?: string;
}
}

View File

@ -0,0 +1,300 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var admin_reports_v1;
(function (admin_reports_v1) {
/**
* Admin Reports API
*
* Fetches reports for the administrators of G Suite customers about the
* usage, collaboration, security, and risk for their users.
*
* @example
* const {google} = require('googleapis');
* const admin = google.admin('reports_v1');
*
* @namespace admin
* @type {Function}
* @version reports_v1
* @variation reports_v1
* @param {object=} options Options for Admin
*/
class Admin {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.activities = new Resource$Activities(this);
this.channels = new Resource$Channels(this);
this.customerUsageReports = new Resource$Customerusagereports(this);
this.entityUsageReports = new Resource$Entityusagereports(this);
this.userUsageReport = new Resource$Userusagereport(this);
}
getRoot() {
return this.root;
}
}
admin_reports_v1.Admin = Admin;
class Resource$Activities {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['userKey', 'applicationName'],
pathParams: ['applicationName', 'userKey'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
watch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: ['userKey', 'applicationName'],
pathParams: ['applicationName', 'userKey'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
admin_reports_v1.Resource$Activities = Resource$Activities;
class Resource$Channels {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
stop(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/admin/reports_v1/channels/stop')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
admin_reports_v1.Resource$Channels = Resource$Channels;
class Resource$Customerusagereports {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/usage/dates/{date}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['date'],
pathParams: ['date'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
admin_reports_v1.Resource$Customerusagereports = Resource$Customerusagereports;
class Resource$Entityusagereports {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/reports/v1/usage/{entityType}/{entityKey}/dates/{date}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['entityType', 'entityKey', 'date'],
pathParams: ['date', 'entityKey', 'entityType'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
admin_reports_v1.Resource$Entityusagereports = Resource$Entityusagereports;
class Resource$Userusagereport {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/admin/reports/v1/usage/users/{userKey}/dates/{date}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['userKey', 'date'],
pathParams: ['date', 'userKey'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
admin_reports_v1.Resource$Userusagereport = Resource$Userusagereport;
})(admin_reports_v1 = exports.admin_reports_v1 || (exports.admin_reports_v1 = {}));
//# sourceMappingURL=reports_v1.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/adsense
> Accesses AdSense publishers&#39; inventory and generates performance reports.
## Installation
```sh
$ npm install @google/adsense
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,6 @@
import { adsense_v1_4 } from './v1.4';
export declare const VERSIONS: {
'v1.4': typeof adsense_v1_4.Adsense;
};
export declare function adsense(version: 'v1_4'): adsense_v1_4.Adsense;
export declare function adsense(options: adsense_v1_4.Options): adsense_v1_4.Adsense;

View File

@ -0,0 +1,25 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_4_1 = require("./v1.4");
exports.VERSIONS = {
'v1.4': v1_4_1.adsense_v1_4.Adsense,
};
function adsense(versionOrOptions) {
return googleapis_common_1.getAPI('adsense', versionOrOptions, exports.VERSIONS, this);
}
exports.adsense = adsense;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/adsense/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,iCAAoC;AAEvB,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE,mBAAY,CAAC,OAAO;CAC7B,CAAC;AAIF,SAAgB,OAAO,CACO,gBAA6C;IACzE,OAAO,0BAAM,CAAI,SAAS,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAChE,CAAC;AAHD,0BAGC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/adsense",
"version": "0.1.0",
"description": "adsense",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/adsensehost
> Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.
## Installation
```sh
$ npm install @google/adsensehost
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,6 @@
import { adsensehost_v4_1 } from './v4.1';
export declare const VERSIONS: {
'v4.1': typeof adsensehost_v4_1.Adsensehost;
};
export declare function adsensehost(version: 'v4_1'): adsensehost_v4_1.Adsensehost;
export declare function adsensehost(options: adsensehost_v4_1.Options): adsensehost_v4_1.Adsensehost;

View File

@ -0,0 +1,25 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v4_1_1 = require("./v4.1");
exports.VERSIONS = {
'v4.1': v4_1_1.adsensehost_v4_1.Adsensehost,
};
function adsensehost(versionOrOptions) {
return googleapis_common_1.getAPI('adsensehost', versionOrOptions, exports.VERSIONS, this);
}
exports.adsensehost = adsensehost;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/adsensehost/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,iCAAwC;AAE3B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE,uBAAgB,CAAC,WAAW;CACrC,CAAC;AAKF,SAAgB,WAAW,CAEvB,gBAAiD;IACnD,OAAO,0BAAM,CAAI,aAAa,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACpE,CAAC;AAJD,kCAIC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/adsensehost",
"version": "0.1.0",
"description": "adsensehost",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,977 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var adsensehost_v4_1;
(function (adsensehost_v4_1) {
/**
* AdSense Host API
*
* Generates performance reports, generates ad codes, and provides publisher
* management capabilities for AdSense Hosts.
*
* @example
* const {google} = require('googleapis');
* const adsensehost = google.adsensehost('v4.1');
*
* @namespace adsensehost
* @type {Function}
* @version v4.1
* @variation v4.1
* @param {object=} options Options for Adsensehost
*/
class Adsensehost {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.accounts = new Resource$Accounts(this);
this.adclients = new Resource$Adclients(this);
this.associationsessions = new Resource$Associationsessions(this);
this.customchannels = new Resource$Customchannels(this);
this.reports = new Resource$Reports(this);
this.urlchannels = new Resource$Urlchannels(this);
}
getRoot() {
return this.root;
}
}
adsensehost_v4_1.Adsensehost = Adsensehost;
class Resource$Accounts {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
this.adclients = new Resource$Accounts$Adclients(root);
this.adunits = new Resource$Accounts$Adunits(root);
this.reports = new Resource$Accounts$Reports(root);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/accounts/{accountId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/accounts')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['filterAdClientId'],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Accounts = Resource$Accounts;
class Resource$Accounts$Adclients {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/accounts/{accountId}/adclients')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Accounts$Adclients = Resource$Accounts$Adclients;
class Resource$Accounts$Adunits {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE'
}, options),
params,
requiredParams: ['accountId', 'adClientId', 'adUnitId'],
pathParams: ['accountId', 'adClientId', 'adUnitId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'adClientId', 'adUnitId'],
pathParams: ['accountId', 'adClientId', 'adUnitId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
getAdCode(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'adClientId', 'adUnitId'],
pathParams: ['accountId', 'adClientId', 'adUnitId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH'
}, options),
params,
requiredParams: ['accountId', 'adClientId', 'adUnitId'],
pathParams: ['accountId', 'adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/accounts/{accountId}/adclients/{adClientId}/adunits')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT'
}, options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Accounts$Adunits = Resource$Accounts$Adunits;
class Resource$Accounts$Reports {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/accounts/{accountId}/reports')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'startDate', 'endDate'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Accounts$Reports = Resource$Accounts$Reports;
class Resource$Adclients {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/adclients/{adClientId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/adclients')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Adclients = Resource$Adclients;
class Resource$Associationsessions {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
start(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/associationsessions/start')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['productCode', 'websiteUrl'],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
verify(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/associationsessions/verify')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['token'],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Associationsessions = Resource$Associationsessions;
class Resource$Customchannels {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels/{customChannelId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE'
}, options),
params,
requiredParams: ['adClientId', 'customChannelId'],
pathParams: ['adClientId', 'customChannelId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels/{customChannelId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['adClientId', 'customChannelId'],
pathParams: ['adClientId', 'customChannelId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
patch(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH'
}, options),
params,
requiredParams: ['adClientId', 'customChannelId'],
pathParams: ['adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
update(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/customchannels')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT'
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Customchannels = Resource$Customchannels;
class Resource$Reports {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
generate(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/adsensehost/v4.1/reports')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['startDate', 'endDate'],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Reports = Resource$Reports;
class Resource$Urlchannels {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
delete(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/urlchannels/{urlChannelId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE'
}, options),
params,
requiredParams: ['adClientId', 'urlChannelId'],
pathParams: ['adClientId', 'urlChannelId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
insert(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/urlchannels')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/adsensehost/v4.1/adclients/{adClientId}/urlchannels')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['adClientId'],
pathParams: ['adClientId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
adsensehost_v4_1.Resource$Urlchannels = Resource$Urlchannels;
})(adsensehost_v4_1 = exports.adsensehost_v4_1 || (exports.adsensehost_v4_1 = {}));
//# sourceMappingURL=v4.1.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/analytics
> Views and manages your Google Analytics data.
## Installation
```sh
$ npm install @google/analytics
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,10 @@
import { analytics_v2_4 } from './v2.4';
import { analytics_v3 } from './v3';
export declare const VERSIONS: {
'v2.4': typeof analytics_v2_4.Analytics;
'v3': typeof analytics_v3.Analytics;
};
export declare function analytics(version: 'v2_4'): analytics_v2_4.Analytics;
export declare function analytics(options: analytics_v2_4.Options): analytics_v2_4.Analytics;
export declare function analytics(version: 'v3'): analytics_v3.Analytics;
export declare function analytics(options: analytics_v3.Options): analytics_v3.Analytics;

View File

@ -0,0 +1,27 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v2_4_1 = require("./v2.4");
const v3_1 = require("./v3");
exports.VERSIONS = {
'v2.4': v2_4_1.analytics_v2_4.Analytics,
'v3': v3_1.analytics_v3.Analytics,
};
function analytics(versionOrOptions) {
return googleapis_common_1.getAPI('analytics', versionOrOptions, exports.VERSIONS, this);
}
exports.analytics = analytics;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/analytics/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,iCAAsC;AACtC,6BAAkC;AAErB,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE,qBAAc,CAAC,SAAS;IAChC,IAAI,EAAE,iBAAY,CAAC,SAAS;CAC7B,CAAC;AAQF,SACA,SAAS,CAEL,gBAAyE;IAC3E,OAAO,0BAAM,CAAI,WAAW,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AALD,8BAKC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/analytics",
"version": "0.1.0",
"description": "analytics",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

View File

@ -0,0 +1,368 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace analytics_v2_4 {
interface Options extends GlobalOptions {
version: 'v2_4';
}
/**
* Google Analytics API
*
* Views and manages your Google Analytics data.
*
* @example
* const {google} = require('googleapis');
* const analytics = google.analytics('v2.4');
*
* @namespace analytics
* @type {Function}
* @version v2.4
* @variation v2.4
* @param {object=} options Options for Analytics
*/
class Analytics {
_options: GlobalOptions;
google?: GoogleConfigurable;
root: this;
data: Resource$Data;
management: Resource$Management;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
getRoot(): this;
}
class Resource$Data {
root: Analytics;
constructor(root: Analytics);
getRoot(): Analytics;
/**
* analytics.data.get
* @desc Returns Analytics report data for a view (profile).
* @alias analytics.data.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string=} params.dimensions A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.
* @param {string} params.end-date End date for fetching report data. All requests should specify an end date formatted as YYYY-MM-DD.
* @param {string=} params.filters A comma-separated list of dimension or metric filters to be applied to the report data.
* @param {string} params.ids Unique table ID for retrieving report data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
* @param {integer=} params.max-results The maximum number of entries to include in this feed.
* @param {string} params.metrics A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified to retrieve a valid Analytics report.
* @param {string=} params.segment An Analytics advanced segment to be applied to the report data.
* @param {string=} params.sort A comma-separated list of dimensions or metrics that determine the sort order for the report data.
* @param {string} params.start-date Start date for fetching report data. All requests should specify a start date formatted as YYYY-MM-DD.
* @param {integer=} params.start-index An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Data$Get, options?: MethodOptions): AxiosPromise<void>;
get(params: Params$Resource$Data$Get, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
get(params: Params$Resource$Data$Get, callback: BodyResponseCallback<void>): void;
get(callback: BodyResponseCallback<void>): void;
}
interface Params$Resource$Data$Get {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* A comma-separated list of Analytics dimensions. E.g.,
* 'ga:browser,ga:city'.
*/
dimensions?: string;
/**
* End date for fetching report data. All requests should specify an end
* date formatted as YYYY-MM-DD.
*/
'end-date'?: string;
/**
* A comma-separated list of dimension or metric filters to be applied to
* the report data.
*/
filters?: string;
/**
* Unique table ID for retrieving report data. Table ID is of the form
* ga:XXXX, where XXXX is the Analytics view (profile) ID.
*/
ids?: string;
/**
* The maximum number of entries to include in this feed.
*/
'max-results'?: number;
/**
* A comma-separated list of Analytics metrics. E.g.,
* 'ga:sessions,ga:pageviews'. At least one metric must be specified to
* retrieve a valid Analytics report.
*/
metrics?: string;
/**
* An Analytics advanced segment to be applied to the report data.
*/
segment?: string;
/**
* A comma-separated list of dimensions or metrics that determine the sort
* order for the report data.
*/
sort?: string;
/**
* Start date for fetching report data. All requests should specify a start
* date formatted as YYYY-MM-DD.
*/
'start-date'?: string;
/**
* An index of the first entity to retrieve. Use this parameter as a
* pagination mechanism along with the max-results parameter.
*/
'start-index'?: number;
}
class Resource$Management {
root: Analytics;
accounts: Resource$Management$Accounts;
goals: Resource$Management$Goals;
profiles: Resource$Management$Profiles;
segments: Resource$Management$Segments;
webproperties: Resource$Management$Webproperties;
constructor(root: Analytics);
getRoot(): Analytics;
}
class Resource$Management$Accounts {
root: Analytics;
constructor(root: Analytics);
getRoot(): Analytics;
/**
* analytics.management.accounts.list
* @desc Lists all accounts to which the user has access.
* @alias analytics.management.accounts.list
* @memberOf! ()
*
* @param {object=} params Parameters for request
* @param {integer=} params.max-results The maximum number of accounts to include in this response.
* @param {integer=} params.start-index An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Management$Accounts$List, options?: MethodOptions): AxiosPromise<void>;
list(params: Params$Resource$Management$Accounts$List, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
list(params: Params$Resource$Management$Accounts$List, callback: BodyResponseCallback<void>): void;
list(callback: BodyResponseCallback<void>): void;
}
interface Params$Resource$Management$Accounts$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The maximum number of accounts to include in this response.
*/
'max-results'?: number;
/**
* An index of the first account to retrieve. Use this parameter as a
* pagination mechanism along with the max-results parameter.
*/
'start-index'?: number;
}
class Resource$Management$Goals {
root: Analytics;
constructor(root: Analytics);
getRoot(): Analytics;
/**
* analytics.management.goals.list
* @desc Lists goals to which the user has access.
* @alias analytics.management.goals.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.accountId Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.
* @param {integer=} params.max-results The maximum number of goals to include in this response.
* @param {string} params.profileId View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to.
* @param {integer=} params.start-index An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
* @param {string} params.webPropertyId Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Management$Goals$List, options?: MethodOptions): AxiosPromise<void>;
list(params: Params$Resource$Management$Goals$List, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
list(params: Params$Resource$Management$Goals$List, callback: BodyResponseCallback<void>): void;
list(callback: BodyResponseCallback<void>): void;
}
interface Params$Resource$Management$Goals$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Account ID to retrieve goals for. Can either be a specific account ID or
* '~all', which refers to all the accounts that user has access to.
*/
accountId?: string;
/**
* The maximum number of goals to include in this response.
*/
'max-results'?: number;
/**
* View (Profile) ID to retrieve goals for. Can either be a specific view
* (profile) ID or '~all', which refers to all the views (profiles) that
* user has access to.
*/
profileId?: string;
/**
* An index of the first goal to retrieve. Use this parameter as a
* pagination mechanism along with the max-results parameter.
*/
'start-index'?: number;
/**
* Web property ID to retrieve goals for. Can either be a specific web
* property ID or '~all', which refers to all the web properties that user
* has access to.
*/
webPropertyId?: string;
}
class Resource$Management$Profiles {
root: Analytics;
constructor(root: Analytics);
getRoot(): Analytics;
/**
* analytics.management.profiles.list
* @desc Lists views (profiles) to which the user has access.
* @alias analytics.management.profiles.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.accountId Account ID for the views (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access.
* @param {integer=} params.max-results The maximum number of views (profiles) to include in this response.
* @param {integer=} params.start-index An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
* @param {string} params.webPropertyId Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Management$Profiles$List, options?: MethodOptions): AxiosPromise<void>;
list(params: Params$Resource$Management$Profiles$List, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
list(params: Params$Resource$Management$Profiles$List, callback: BodyResponseCallback<void>): void;
list(callback: BodyResponseCallback<void>): void;
}
interface Params$Resource$Management$Profiles$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Account ID for the views (profiles) to retrieve. Can either be a specific
* account ID or '~all', which refers to all the accounts to which the user
* has access.
*/
accountId?: string;
/**
* The maximum number of views (profiles) to include in this response.
*/
'max-results'?: number;
/**
* An index of the first entity to retrieve. Use this parameter as a
* pagination mechanism along with the max-results parameter.
*/
'start-index'?: number;
/**
* Web property ID for the views (profiles) to retrieve. Can either be a
* specific web property ID or '~all', which refers to all the web
* properties to which the user has access.
*/
webPropertyId?: string;
}
class Resource$Management$Segments {
root: Analytics;
constructor(root: Analytics);
getRoot(): Analytics;
/**
* analytics.management.segments.list
* @desc Lists advanced segments to which the user has access.
* @alias analytics.management.segments.list
* @memberOf! ()
*
* @param {object=} params Parameters for request
* @param {integer=} params.max-results The maximum number of advanced segments to include in this response.
* @param {integer=} params.start-index An index of the first advanced segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Management$Segments$List, options?: MethodOptions): AxiosPromise<void>;
list(params: Params$Resource$Management$Segments$List, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
list(params: Params$Resource$Management$Segments$List, callback: BodyResponseCallback<void>): void;
list(callback: BodyResponseCallback<void>): void;
}
interface Params$Resource$Management$Segments$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The maximum number of advanced segments to include in this response.
*/
'max-results'?: number;
/**
* An index of the first advanced segment to retrieve. Use this parameter as
* a pagination mechanism along with the max-results parameter.
*/
'start-index'?: number;
}
class Resource$Management$Webproperties {
root: Analytics;
constructor(root: Analytics);
getRoot(): Analytics;
/**
* analytics.management.webproperties.list
* @desc Lists web properties to which the user has access.
* @alias analytics.management.webproperties.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.accountId Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.
* @param {integer=} params.max-results The maximum number of web properties to include in this response.
* @param {integer=} params.start-index An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Management$Webproperties$List, options?: MethodOptions): AxiosPromise<void>;
list(params: Params$Resource$Management$Webproperties$List, options: MethodOptions | BodyResponseCallback<void>, callback: BodyResponseCallback<void>): void;
list(params: Params$Resource$Management$Webproperties$List, callback: BodyResponseCallback<void>): void;
list(callback: BodyResponseCallback<void>): void;
}
interface Params$Resource$Management$Webproperties$List {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Account ID to retrieve web properties for. Can either be a specific
* account ID or '~all', which refers to all the accounts that user has
* access to.
*/
accountId?: string;
/**
* The maximum number of web properties to include in this response.
*/
'max-results'?: number;
/**
* An index of the first entity to retrieve. Use this parameter as a
* pagination mechanism along with the max-results parameter.
*/
'start-index'?: number;
}
}

View File

@ -0,0 +1,320 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var analytics_v2_4;
(function (analytics_v2_4) {
/**
* Google Analytics API
*
* Views and manages your Google Analytics data.
*
* @example
* const {google} = require('googleapis');
* const analytics = google.analytics('v2.4');
*
* @namespace analytics
* @type {Function}
* @version v2.4
* @variation v2.4
* @param {object=} options Options for Analytics
*/
class Analytics {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.data = new Resource$Data(this);
this.management = new Resource$Management(this);
}
getRoot() {
return this.root;
}
}
analytics_v2_4.Analytics = Analytics;
class Resource$Data {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
get(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/analytics/v2.4/data')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['ids', 'start-date', 'end-date', 'metrics'],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
analytics_v2_4.Resource$Data = Resource$Data;
class Resource$Management {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
this.accounts = new Resource$Management$Accounts(root);
this.goals = new Resource$Management$Goals(root);
this.profiles = new Resource$Management$Profiles(root);
this.segments = new Resource$Management$Segments(root);
this.webproperties = new Resource$Management$Webproperties(root);
}
getRoot() {
return this.root;
}
}
analytics_v2_4.Resource$Management = Resource$Management;
class Resource$Management$Accounts {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/analytics/v2.4/management/accounts')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
analytics_v2_4.Resource$Management$Accounts = Resource$Management$Accounts;
class Resource$Management$Goals {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/analytics/v2.4/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'webPropertyId', 'profileId'],
pathParams: ['accountId', 'profileId', 'webPropertyId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
analytics_v2_4.Resource$Management$Goals = Resource$Management$Goals;
class Resource$Management$Profiles {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/analytics/v2.4/management/accounts/{accountId}/webproperties/{webPropertyId}/profiles')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId', 'webPropertyId'],
pathParams: ['accountId', 'webPropertyId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
analytics_v2_4.Resource$Management$Profiles = Resource$Management$Profiles;
class Resource$Management$Segments {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/analytics/v2.4/management/segments')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
analytics_v2_4.Resource$Management$Segments = Resource$Management$Segments;
class Resource$Management$Webproperties {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
list(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl +
'/analytics/v2.4/management/accounts/{accountId}/webproperties')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
analytics_v2_4.Resource$Management$Webproperties = Resource$Management$Webproperties;
})(analytics_v2_4 = exports.analytics_v2_4 || (exports.analytics_v2_4 = {}));
//# sourceMappingURL=v2.4.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/analyticsreporting
> Accesses Analytics report data.
## Installation
```sh
$ npm install @google/analyticsreporting
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,6 @@
import { analyticsreporting_v4 } from './v4';
export declare const VERSIONS: {
'v4': typeof analyticsreporting_v4.Analyticsreporting;
};
export declare function analyticsreporting(version: 'v4'): analyticsreporting_v4.Analyticsreporting;
export declare function analyticsreporting(options: analyticsreporting_v4.Options): analyticsreporting_v4.Analyticsreporting;

View File

@ -0,0 +1,25 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v4_1 = require("./v4");
exports.VERSIONS = {
'v4': v4_1.analyticsreporting_v4.Analyticsreporting,
};
function analyticsreporting(versionOrOptions) {
return googleapis_common_1.getAPI('analyticsreporting', versionOrOptions, exports.VERSIONS, this);
}
exports.analyticsreporting = analyticsreporting;
//# sourceMappingURL=index.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/apis/analyticsreporting/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,kCAAkC;AAElC,yDAA6D;AAC7D,6BAA2C;AAE9B,QAAA,QAAQ,GAAG;IACtB,IAAI,EAAE,0BAAqB,CAAC,kBAAkB;CAC/C,CAAC;AAMF,SACA,kBAAkB,CAEd,gBAAoD;IACtD,OAAO,0BAAM,CAAI,oBAAoB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AAC3E,CAAC;AALD,gDAKC"}

View File

@ -0,0 +1,24 @@
{
"name": "@google/analyticsreporting",
"version": "0.1.0",
"description": "analyticsreporting",
"main": "index.js",
"types": "index.d.ts",
"keywords": ["google"],
"author": "Google LLC",
"license": "Apache-2.0",
"homepage": "https://github.com/google/google-api-nodejs-client",
"bugs": {
"url" : "https://github.com/google/google-api-nodejs-client/issues"
},
"repository": {
"type": "git",
"url" : "https://github.com/google/google-api-nodejs-client.git"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"googleapis-common": "^0.2.0"
}
}

View File

@ -0,0 +1,961 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AxiosPromise } from 'axios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace analyticsreporting_v4 {
interface Options extends GlobalOptions {
version: 'v4';
}
/**
* Analytics Reporting API
*
* Accesses Analytics report data.
*
* @example
* const {google} = require('googleapis');
* const analyticsreporting = google.analyticsreporting('v4');
*
* @namespace analyticsreporting
* @type {Function}
* @version v4
* @variation v4
* @param {object=} options Options for Analyticsreporting
*/
class Analyticsreporting {
_options: GlobalOptions;
google?: GoogleConfigurable;
root: this;
reports: Resource$Reports;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
getRoot(): this;
}
/**
* Defines a cohort. A cohort is a group of users who share a common
* characteristic. For example, all users with the same acquisition date
* belong to the same cohort.
*/
interface Schema$Cohort {
/**
* This is used for `FIRST_VISIT_DATE` cohort, the cohort selects users
* whose first visit date is between start date and end date defined in the
* DateRange. The date ranges should be aligned for cohort requests. If the
* request contains `ga:cohortNthDay` it should be exactly one day long, if
* `ga:cohortNthWeek` it should be aligned to the week boundary (starting at
* Sunday and ending Saturday), and for `ga:cohortNthMonth` the date range
* should be aligned to the month (starting at the first and ending on the
* last day of the month). For LTV requests there are no such restrictions.
* You do not need to supply a date range for the
* `reportsRequest.dateRanges` field.
*/
dateRange?: Schema$DateRange;
/**
* A unique name for the cohort. If not defined name will be auto-generated
* with values cohort_[1234...].
*/
name?: string;
/**
* Type of the cohort. The only supported type as of now is
* `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated as
* `FIRST_VISIT_DATE` type cohort.
*/
type?: string;
}
/**
* Defines a cohort group. For example: &quot;cohortGroup&quot;: {
* &quot;cohorts&quot;: [{ &quot;name&quot;: &quot;cohort 1&quot;,
* &quot;type&quot;: &quot;FIRST_VISIT_DATE&quot;, &quot;dateRange&quot;: {
* &quot;startDate&quot;: &quot;2015-08-01&quot;, &quot;endDate&quot;:
* &quot;2015-08-01&quot; } },{ &quot;name&quot;: &quot;cohort
* 2&quot; &quot;type&quot;: &quot;FIRST_VISIT_DATE&quot;
* &quot;dateRange&quot;: { &quot;startDate&quot;: &quot;2015-07-01&quot;,
* &quot;endDate&quot;: &quot;2015-07-01&quot; } }] }
*/
interface Schema$CohortGroup {
/**
* The definition for the cohort.
*/
cohorts?: Schema$Cohort[];
/**
* Enable Life Time Value (LTV). LTV measures lifetime value for users
* acquired through different channels. Please see: [Cohort
* Analysis](https://support.google.com/analytics/answer/6074676) and
* [Lifetime Value](https://support.google.com/analytics/answer/6182550) If
* the value of lifetimeValue is false: - The metric values are similar to
* the values in the web interface cohort report. - The cohort definition
* date ranges must be aligned to the calendar week and month. i.e. while
* requesting `ga:cohortNthWeek` the `startDate` in the cohort definition
* should be a Sunday and the `endDate` should be the following Saturday,
* and for `ga:cohortNthMonth`, the `startDate` should be the 1st of the
* month and `endDate` should be the last day of the month. When the
* lifetimeValue is true: - The metric values will correspond to the values
* in the web interface LifeTime value report. - The Lifetime Value report
* shows you how user value (Revenue) and engagement (Appviews, Goal
* Completions, Sessions, and Session Duration) grow during the 90 days
* after a user is acquired. - The metrics are calculated as a cumulative
* average per user per the time increment. - The cohort definition date
* ranges need not be aligned to the calendar week and month boundaries. -
* The `viewId` must be an [app view
* ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)
*/
lifetimeValue?: boolean;
}
/**
* Column headers.
*/
interface Schema$ColumnHeader {
/**
* The dimension names in the response.
*/
dimensions?: string[];
/**
* Metric headers for the metrics in the response.
*/
metricHeader?: Schema$MetricHeader;
}
/**
* A contiguous set of days: startDate, startDate + 1 day, ..., endDate. The
* start and end dates are specified in
* [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.
*/
interface Schema$DateRange {
/**
* The end date for the query in the format `YYYY-MM-DD`.
*/
endDate?: string;
/**
* The start date for the query in the format `YYYY-MM-DD`.
*/
startDate?: string;
}
/**
* Used to return a list of metrics for a single DateRange / dimension
* combination
*/
interface Schema$DateRangeValues {
/**
* The values of each pivot region.
*/
pivotValueRegions?: Schema$PivotValueRegion[];
/**
* Each value corresponds to each Metric in the request.
*/
values?: string[];
}
/**
* [Dimensions](https://support.google.com/analytics/answer/1033861) are
* attributes of your data. For example, the dimension `ga:city` indicates the
* city, for example, &quot;Paris&quot; or &quot;New York&quot;, from which a
* session originates.
*/
interface Schema$Dimension {
/**
* If non-empty, we place dimension values into buckets after string to
* int64. Dimension values that are not the string representation of an
* integral value will be converted to zero. The bucket values have to be
* in increasing order. Each bucket is closed on the lower end, and open on
* the upper end. The &quot;first&quot; bucket includes all values less than
* the first boundary, the &quot;last&quot; bucket includes all values up to
* infinity. Dimension values that fall in a bucket get transformed to a new
* dimension value. For example, if one gives a list of &quot;0, 1, 3, 4,
* 7&quot;, then we return the following buckets: - bucket #1: values &lt;
* 0, dimension value &quot;&lt;0&quot; - bucket #2: values in [0,1),
* dimension value &quot;0&quot; - bucket #3: values in [1,3), dimension
* value &quot;1-2&quot; - bucket #4: values in [3,4), dimension value
* &quot;3&quot; - bucket #5: values in [4,7), dimension value
* &quot;4-6&quot; - bucket #6: values &gt;= 7, dimension value
* &quot;7+&quot; NOTE: If you are applying histogram mutation on any
* dimension, and using that dimension in sort, you will want to use the
* sort type `HISTOGRAM_BUCKET` for that purpose. Without that the dimension
* values will be sorted according to dictionary (lexicographic) order. For
* example the ascending dictionary order is: &quot;&lt;50&quot;,
* &quot;1001+&quot;, &quot;121-1000&quot;, &quot;50-120&quot; And the
* ascending `HISTOGRAM_BUCKET` order is: &quot;&lt;50&quot;,
* &quot;50-120&quot;, &quot;121-1000&quot;, &quot;1001+&quot; The client
* has to explicitly request `&quot;orderType&quot;:
* &quot;HISTOGRAM_BUCKET&quot;` for a histogram-mutated dimension.
*/
histogramBuckets?: string[];
/**
* Name of the dimension to fetch, for example `ga:browser`.
*/
name?: string;
}
/**
* Dimension filter specifies the filtering options on a dimension.
*/
interface Schema$DimensionFilter {
/**
* Should the match be case sensitive? Default is false.
*/
caseSensitive?: boolean;
/**
* The dimension to filter on. A DimensionFilter must contain a dimension.
*/
dimensionName?: string;
/**
* Strings or regular expression to match against. Only the first value of
* the list is used for comparison unless the operator is `IN_LIST`. If
* `IN_LIST` operator, then the entire list is used to filter the dimensions
* as explained in the description of the `IN_LIST` operator.
*/
expressions?: string[];
/**
* Logical `NOT` operator. If this boolean is set to true, then the matching
* dimension values will be excluded in the report. The default is false.
*/
not?: boolean;
/**
* How to match the dimension to the expression. The default is REGEXP.
*/
operator?: string;
}
/**
* A group of dimension filters. Set the operator value to specify how the
* filters are logically combined.
*/
interface Schema$DimensionFilterClause {
/**
* The repeated set of filters. They are logically combined based on the
* operator specified.
*/
filters?: Schema$DimensionFilter[];
/**
* The operator for combining multiple dimension filters. If unspecified, it
* is treated as an `OR`.
*/
operator?: string;
}
/**
* Dynamic segment definition for defining the segment within the request. A
* segment can select users, sessions or both.
*/
interface Schema$DynamicSegment {
/**
* The name of the dynamic segment.
*/
name?: string;
/**
* Session Segment to select sessions to include in the segment.
*/
sessionSegment?: Schema$SegmentDefinition;
/**
* User Segment to select users to include in the segment.
*/
userSegment?: Schema$SegmentDefinition;
}
/**
* The batch request containing multiple report request.
*/
interface Schema$GetReportsRequest {
/**
* Requests, each request will have a separate response. There can be a
* maximum of 5 requests. All requests should have the same `dateRanges`,
* `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.
*/
reportRequests?: Schema$ReportRequest[];
/**
* Enables [resource based
* quotas](/analytics/devguides/reporting/core/v4/limits-quotas#analytics_reporting_api_v4),
* (defaults to `False`). If this field is set to `True` the per view
* (profile) quotas are governed by the computational cost of the request.
* Note that using cost based quotas will higher enable sampling rates. (10
* Million for `SMALL`, 100M for `LARGE`. See the [limits and quotas
* documentation](/analytics/devguides/reporting/core/v4/limits-quotas#analytics_reporting_api_v4)
* for details.
*/
useResourceQuotas?: boolean;
}
/**
* The main response class which holds the reports from the Reporting API
* `batchGet` call.
*/
interface Schema$GetReportsResponse {
/**
* The amount of resource quota tokens deducted to execute the query.
* Includes all responses.
*/
queryCost?: number;
/**
* Responses corresponding to each of the request.
*/
reports?: Schema$Report[];
/**
* The amount of resource quota remaining for the property.
*/
resourceQuotasRemaining?: Schema$ResourceQuotasRemaining;
}
/**
* [Metrics](https://support.google.com/analytics/answer/1033861) are the
* quantitative measurements. For example, the metric `ga:users` indicates the
* total number of users for the requested time period.
*/
interface Schema$Metric {
/**
* An alias for the metric expression is an alternate name for the
* expression. The alias can be used for filtering and sorting. This field
* is optional and is useful if the expression is not a single metric but a
* complex expression which cannot be used in filtering and sorting. The
* alias is also used in the response column header.
*/
alias?: string;
/**
* A metric expression in the request. An expression is constructed from one
* or more metrics and numbers. Accepted operators include: Plus (+), Minus
* (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,
* Positive cardinal numbers (0-9), can include decimals and is limited to
* 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the
* metric expression is just a single metric name like `ga:users`. Adding
* mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics will result
* in unexpected results.
*/
expression?: string;
/**
* Specifies how the metric expression should be formatted, for example
* `INTEGER`.
*/
formattingType?: string;
}
/**
* MetricFilter specifies the filter on a metric.
*/
interface Schema$MetricFilter {
/**
* The value to compare against.
*/
comparisonValue?: string;
/**
* The metric that will be filtered on. A metricFilter must contain a metric
* name. A metric name can be an alias earlier defined as a metric or it can
* also be a metric expression.
*/
metricName?: string;
/**
* Logical `NOT` operator. If this boolean is set to true, then the matching
* metric values will be excluded in the report. The default is false.
*/
not?: boolean;
/**
* Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the comparisonValue,
* the default is `EQUAL`. If the operator is `IS_MISSING`, checks if the
* metric is missing and would ignore the comparisonValue.
*/
operator?: string;
}
/**
* Represents a group of metric filters. Set the operator value to specify how
* the filters are logically combined.
*/
interface Schema$MetricFilterClause {
/**
* The repeated set of filters. They are logically combined based on the
* operator specified.
*/
filters?: Schema$MetricFilter[];
/**
* The operator for combining multiple metric filters. If unspecified, it is
* treated as an `OR`.
*/
operator?: string;
}
/**
* The headers for the metrics.
*/
interface Schema$MetricHeader {
/**
* Headers for the metrics in the response.
*/
metricHeaderEntries?: Schema$MetricHeaderEntry[];
/**
* Headers for the pivots in the response.
*/
pivotHeaders?: Schema$PivotHeader[];
}
/**
* Header for the metrics.
*/
interface Schema$MetricHeaderEntry {
/**
* The name of the header.
*/
name?: string;
/**
* The type of the metric, for example `INTEGER`.
*/
type?: string;
}
/**
* Specifies the sorting options.
*/
interface Schema$OrderBy {
/**
* The field which to sort by. The default sort order is ascending. Example:
* `ga:browser`. Note, that you can only specify one field for sort here.
* For example, `ga:browser, ga:city` is not valid.
*/
fieldName?: string;
/**
* The order type. The default orderType is `VALUE`.
*/
orderType?: string;
/**
* The sorting order for the field.
*/
sortOrder?: string;
}
/**
* A list of segment filters in the `OR` group are combined with the logical
* OR operator.
*/
interface Schema$OrFiltersForSegment {
/**
* List of segment filters to be combined with a `OR` operator.
*/
segmentFilterClauses?: Schema$SegmentFilterClause[];
}
/**
* The Pivot describes the pivot section in the request. The Pivot helps
* rearrange the information in the table for certain reports by pivoting your
* data on a second dimension.
*/
interface Schema$Pivot {
/**
* DimensionFilterClauses are logically combined with an `AND` operator:
* only data that is included by all these DimensionFilterClauses
* contributes to the values in this pivot region. Dimension filters can be
* used to restrict the columns shown in the pivot region. For example if
* you have `ga:browser` as the requested dimension in the pivot region, and
* you specify key filters to restrict `ga:browser` to only &quot;IE&quot;
* or &quot;Firefox&quot;, then only those two browsers would show up as
* columns.
*/
dimensionFilterClauses?: Schema$DimensionFilterClause[];
/**
* A list of dimensions to show as pivot columns. A Pivot can have a maximum
* of 4 dimensions. Pivot dimensions are part of the restriction on the
* total number of dimensions allowed in the request.
*/
dimensions?: Schema$Dimension[];
/**
* Specifies the maximum number of groups to return. The default value is
* 10, also the maximum value is 1,000.
*/
maxGroupCount?: number;
/**
* The pivot metrics. Pivot metrics are part of the restriction on total
* number of metrics allowed in the request.
*/
metrics?: Schema$Metric[];
/**
* If k metrics were requested, then the response will contain some
* data-dependent multiple of k columns in the report. E.g., if you pivoted
* on the dimension `ga:browser` then you&#39;d get k columns for
* &quot;Firefox&quot;, k columns for &quot;IE&quot;, k columns for
* &quot;Chrome&quot;, etc. The ordering of the groups of columns is
* determined by descending order of &quot;total&quot; for the first of the
* k values. Ties are broken by lexicographic ordering of the first pivot
* dimension, then lexicographic ordering of the second pivot dimension, and
* so on. E.g., if the totals for the first value for Firefox, IE, and
* Chrome were 8, 2, 8, respectively, the order of columns would be Chrome,
* Firefox, IE. The following let you choose which of the groups of k
* columns are included in the response.
*/
startGroup?: number;
}
/**
* The headers for each of the pivot sections defined in the request.
*/
interface Schema$PivotHeader {
/**
* A single pivot section header.
*/
pivotHeaderEntries?: Schema$PivotHeaderEntry[];
/**
* The total number of groups for this pivot.
*/
totalPivotGroupsCount?: number;
}
/**
* The headers for the each of the metric column corresponding to the metrics
* requested in the pivots section of the response.
*/
interface Schema$PivotHeaderEntry {
/**
* The name of the dimensions in the pivot response.
*/
dimensionNames?: string[];
/**
* The values for the dimensions in the pivot.
*/
dimensionValues?: string[];
/**
* The metric header for the metric in the pivot.
*/
metric?: Schema$MetricHeaderEntry;
}
/**
* The metric values in the pivot region.
*/
interface Schema$PivotValueRegion {
/**
* The values of the metrics in each of the pivot regions.
*/
values?: string[];
}
/**
* The data response corresponding to the request.
*/
interface Schema$Report {
/**
* The column headers.
*/
columnHeader?: Schema$ColumnHeader;
/**
* Response data.
*/
data?: Schema$ReportData;
/**
* Page token to retrieve the next page of results in the list.
*/
nextPageToken?: string;
}
/**
* The data part of the report.
*/
interface Schema$ReportData {
/**
* The last time the data in the report was refreshed. All the hits received
* before this timestamp are included in the calculation of the report.
*/
dataLastRefreshed?: string;
/**
* Indicates if response to this request is golden or not. Data is golden
* when the exact same request will not produce any new results if asked at
* a later point in time.
*/
isDataGolden?: boolean;
/**
* Minimum and maximum values seen over all matching rows. These are both
* empty when `hideValueRanges` in the request is false, or when rowCount is
* zero.
*/
maximums?: Schema$DateRangeValues[];
/**
* Minimum and maximum values seen over all matching rows. These are both
* empty when `hideValueRanges` in the request is false, or when rowCount is
* zero.
*/
minimums?: Schema$DateRangeValues[];
/**
* Total number of matching rows for this query.
*/
rowCount?: number;
/**
* There&#39;s one ReportRow for every unique combination of dimensions.
*/
rows?: Schema$ReportRow[];
/**
* If the results are
* [sampled](https://support.google.com/analytics/answer/2637192), this
* returns the total number of samples read, one entry per date range. If
* the results are not sampled this field will not be defined. See
* [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
* for details.
*/
samplesReadCounts?: string[];
/**
* If the results are
* [sampled](https://support.google.com/analytics/answer/2637192), this
* returns the total number of samples present, one entry per date range. If
* the results are not sampled this field will not be defined. See
* [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)
* for details.
*/
samplingSpaceSizes?: string[];
/**
* For each requested date range, for the set of all rows that match the
* query, every requested value format gets a total. The total for a value
* format is computed by first totaling the metrics mentioned in the value
* format and then evaluating the value format as a scalar expression. E.g.,
* The &quot;totals&quot; for `3 / (ga:sessions + 2)` we compute `3 / ((sum
* of all relevant ga:sessions) + 2)`. Totals are computed before
* pagination.
*/
totals?: Schema$DateRangeValues[];
}
/**
* The main request class which specifies the Reporting API request.
*/
interface Schema$ReportRequest {
/**
* Cohort group associated with this request. If there is a cohort group in
* the request the `ga:cohort` dimension must be present. Every
* [ReportRequest](#ReportRequest) within a `batchGet` method must contain
* the same `cohortGroup` definition.
*/
cohortGroup?: Schema$CohortGroup;
/**
* Date ranges in the request. The request can have a maximum of 2 date
* ranges. The response will contain a set of metric values for each
* combination of the dimensions for each date range in the request. So, if
* there are two date ranges, there will be two set of metric values, one
* for the original date range and one for the second date range. The
* `reportRequest.dateRanges` field should not be specified for cohorts or
* Lifetime value requests. If a date range is not provided, the default
* date range is (startDate: current date - 7 days, endDate: current date -
* 1 day). Every [ReportRequest](#ReportRequest) within a `batchGet` method
* must contain the same `dateRanges` definition.
*/
dateRanges?: Schema$DateRange[];
/**
* The dimension filter clauses for filtering Dimension Values. They are
* logically combined with the `AND` operator. Note that filtering occurs
* before any dimensions are aggregated, so that the returned metrics
* represent the total for only the relevant dimensions.
*/
dimensionFilterClauses?: Schema$DimensionFilterClause[];
/**
* The dimensions requested. Requests can have a total of 7 dimensions.
*/
dimensions?: Schema$Dimension[];
/**
* Dimension or metric filters that restrict the data returned for your
* request. To use the `filtersExpression`, supply a dimension or metric on
* which to filter, followed by the filter expression. For example, the
* following expression selects `ga:browser` dimension which starts with
* Firefox; `ga:browser=~^Firefox`. For more information on dimensions and
* metric filters, see [Filters
* reference](https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters).
*/
filtersExpression?: string;
/**
* If set to true, hides the total of all metrics for all the matching rows,
* for every date range. The default false and will return the totals.
*/
hideTotals?: boolean;
/**
* If set to true, hides the minimum and maximum across all matching rows.
* The default is false and the value ranges are returned.
*/
hideValueRanges?: boolean;
/**
* If set to false, the response does not include rows if all the retrieved
* metrics are equal to zero. The default is false which will exclude these
* rows.
*/
includeEmptyRows?: boolean;
/**
* The metric filter clauses. They are logically combined with the `AND`
* operator. Metric filters look at only the first date range and not the
* comparing date range. Note that filtering on metrics occurs after the
* metrics are aggregated.
*/
metricFilterClauses?: Schema$MetricFilterClause[];
/**
* The metrics requested. Requests must specify at least one metric.
* Requests can have a total of 10 metrics.
*/
metrics?: Schema$Metric[];
/**
* Sort order on output rows. To compare two rows, the elements of the
* following are applied in order until a difference is found. All date
* ranges in the output get the same row order.
*/
orderBys?: Schema$OrderBy[];
/**
* Page size is for paging and specifies the maximum number of returned
* rows. Page size should be &gt;= 0. A query returns the default of 1,000
* rows. The Analytics Core Reporting API returns a maximum of 100,000 rows
* per request, no matter how many you ask for. It can also return fewer
* rows than requested, if there aren&#39;t as many dimension segments as
* you expect. For instance, there are fewer than 300 possible values for
* `ga:country`, so when segmenting only by country, you can&#39;t get more
* than 300 rows, even if you set `pageSize` to a higher value.
*/
pageSize?: number;
/**
* A continuation token to get the next page of the results. Adding this to
* the request will return the rows after the pageToken. The pageToken
* should be the value returned in the nextPageToken parameter in the
* response to the GetReports request.
*/
pageToken?: string;
/**
* The pivot definitions. Requests can have a maximum of 2 pivots.
*/
pivots?: Schema$Pivot[];
/**
* The desired report
* [sample](https://support.google.com/analytics/answer/2637192) size. If
* the the `samplingLevel` field is unspecified the `DEFAULT` sampling level
* is used. Every [ReportRequest](#ReportRequest) within a `batchGet` method
* must contain the same `samplingLevel` definition. See [developer
* guide](/analytics/devguides/reporting/core/v4/basics#sampling) for
* details.
*/
samplingLevel?: string;
/**
* Segment the data returned for the request. A segment definition helps
* look at a subset of the segment request. A request can contain up to four
* segments. Every [ReportRequest](#ReportRequest) within a `batchGet`
* method must contain the same `segments` definition. Requests with
* segments must have the `ga:segment` dimension.
*/
segments?: Schema$Segment[];
/**
* The Analytics [view
* ID](https://support.google.com/analytics/answer/1009618) from which to
* retrieve data. Every [ReportRequest](#ReportRequest) within a `batchGet`
* method must contain the same `viewId`.
*/
viewId?: string;
}
/**
* A row in the report.
*/
interface Schema$ReportRow {
/**
* List of requested dimensions.
*/
dimensions?: string[];
/**
* List of metrics for each requested DateRange.
*/
metrics?: Schema$DateRangeValues[];
}
/**
* The resource quota tokens remaining for the property after the request is
* completed.
*/
interface Schema$ResourceQuotasRemaining {
/**
* Daily resource quota remaining remaining.
*/
dailyQuotaTokensRemaining?: number;
/**
* Hourly resource quota tokens remaining.
*/
hourlyQuotaTokensRemaining?: number;
}
/**
* The segment definition, if the report needs to be segmented. A Segment is a
* subset of the Analytics data. For example, of the entire set of users, one
* Segment might be users from a particular country or city.
*/
interface Schema$Segment {
/**
* A dynamic segment definition in the request.
*/
dynamicSegment?: Schema$DynamicSegment;
/**
* The segment ID of a built-in or custom segment, for example `gaid::-3`.
*/
segmentId?: string;
}
/**
* SegmentDefinition defines the segment to be a set of SegmentFilters which
* are combined together with a logical `AND` operation.
*/
interface Schema$SegmentDefinition {
/**
* A segment is defined by a set of segment filters which are combined
* together with a logical `AND` operation.
*/
segmentFilters?: Schema$SegmentFilter[];
}
/**
* Dimension filter specifies the filtering options on a dimension.
*/
interface Schema$SegmentDimensionFilter {
/**
* Should the match be case sensitive, ignored for `IN_LIST` operator.
*/
caseSensitive?: boolean;
/**
* Name of the dimension for which the filter is being applied.
*/
dimensionName?: string;
/**
* The list of expressions, only the first element is used for all operators
*/
expressions?: string[];
/**
* Maximum comparison values for `BETWEEN` match type.
*/
maxComparisonValue?: string;
/**
* Minimum comparison values for `BETWEEN` match type.
*/
minComparisonValue?: string;
/**
* The operator to use to match the dimension with the expressions.
*/
operator?: string;
}
/**
* SegmentFilter defines the segment to be either a simple or a sequence
* segment. A simple segment condition contains dimension and metric
* conditions to select the sessions or users. A sequence segment condition
* can be used to select users or sessions based on sequential conditions.
*/
interface Schema$SegmentFilter {
/**
* If true, match the complement of simple or sequence segment. For example,
* to match all visits not from &quot;New York&quot;, we can define the
* segment as follows: &quot;sessionSegment&quot;: {
* &quot;segmentFilters&quot;: [{ &quot;simpleSegment&quot; :{
* &quot;orFiltersForSegment&quot;: [{ &quot;segmentFilterClauses&quot;:[{
* &quot;dimensionFilter&quot;: { &quot;dimensionName&quot;:
* &quot;ga:city&quot;, &quot;expressions&quot;:
* [&quot;New York&quot;] } }] }]
* }, &quot;not&quot;: &quot;True&quot; }] },
*/
not?: boolean;
/**
* Sequence conditions consist of one or more steps, where each step is
* defined by one or more dimension/metric conditions. Multiple steps can be
* combined with special sequence operators.
*/
sequenceSegment?: Schema$SequenceSegment;
/**
* A Simple segment conditions consist of one or more dimension/metric
* conditions that can be combined
*/
simpleSegment?: Schema$SimpleSegment;
}
/**
* Filter Clause to be used in a segment definition, can be wither a metric or
* a dimension filter.
*/
interface Schema$SegmentFilterClause {
/**
* Dimension Filter for the segment definition.
*/
dimensionFilter?: Schema$SegmentDimensionFilter;
/**
* Metric Filter for the segment definition.
*/
metricFilter?: Schema$SegmentMetricFilter;
/**
* Matches the complement (`!`) of the filter.
*/
not?: boolean;
}
/**
* Metric filter to be used in a segment filter clause.
*/
interface Schema$SegmentMetricFilter {
/**
* The value to compare against. If the operator is `BETWEEN`, this value is
* treated as minimum comparison value.
*/
comparisonValue?: string;
/**
* Max comparison value is only used for `BETWEEN` operator.
*/
maxComparisonValue?: string;
/**
* The metric that will be filtered on. A `metricFilter` must contain a
* metric name.
*/
metricName?: string;
/**
* Specifies is the operation to perform to compare the metric. The default
* is `EQUAL`.
*/
operator?: string;
/**
* Scope for a metric defines the level at which that metric is defined. The
* specified metric scope must be equal to or greater than its primary scope
* as defined in the data model. The primary scope is defined by if the
* segment is selecting users or sessions.
*/
scope?: string;
}
/**
* A segment sequence definition.
*/
interface Schema$SegmentSequenceStep {
/**
* Specifies if the step immediately precedes or can be any time before the
* next step.
*/
matchType?: string;
/**
* A sequence is specified with a list of Or grouped filters which are
* combined with `AND` operator.
*/
orFiltersForSegment?: Schema$OrFiltersForSegment[];
}
/**
* Sequence conditions consist of one or more steps, where each step is
* defined by one or more dimension/metric conditions. Multiple steps can be
* combined with special sequence operators.
*/
interface Schema$SequenceSegment {
/**
* If set, first step condition must match the first hit of the visitor (in
* the date range).
*/
firstStepShouldMatchFirstHit?: boolean;
/**
* The list of steps in the sequence.
*/
segmentSequenceSteps?: Schema$SegmentSequenceStep[];
}
/**
* A Simple segment conditions consist of one or more dimension/metric
* conditions that can be combined.
*/
interface Schema$SimpleSegment {
/**
* A list of segment filters groups which are combined with logical `AND`
* operator.
*/
orFiltersForSegment?: Schema$OrFiltersForSegment[];
}
class Resource$Reports {
root: Analyticsreporting;
constructor(root: Analyticsreporting);
getRoot(): Analyticsreporting;
/**
* analyticsreporting.reports.batchGet
* @desc Returns the Analytics data.
* @alias analyticsreporting.reports.batchGet
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {().GetReportsRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
batchGet(params?: Params$Resource$Reports$Batchget, options?: MethodOptions): AxiosPromise<Schema$GetReportsResponse>;
batchGet(params: Params$Resource$Reports$Batchget, options: MethodOptions | BodyResponseCallback<Schema$GetReportsResponse>, callback: BodyResponseCallback<Schema$GetReportsResponse>): void;
batchGet(params: Params$Resource$Reports$Batchget, callback: BodyResponseCallback<Schema$GetReportsResponse>): void;
batchGet(callback: BodyResponseCallback<Schema$GetReportsResponse>): void;
}
interface Params$Resource$Reports$Batchget {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Request body metadata
*/
requestBody?: Schema$GetReportsRequest;
}
}

View File

@ -0,0 +1,96 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const googleapis_common_1 = require("googleapis-common");
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
var analyticsreporting_v4;
(function (analyticsreporting_v4) {
/**
* Analytics Reporting API
*
* Accesses Analytics report data.
*
* @example
* const {google} = require('googleapis');
* const analyticsreporting = google.analyticsreporting('v4');
*
* @namespace analyticsreporting
* @type {Function}
* @version v4
* @variation v4
* @param {object=} options Options for Analyticsreporting
*/
class Analyticsreporting {
constructor(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.reports = new Resource$Reports(this);
}
getRoot() {
return this.root;
}
}
analyticsreporting_v4.Analyticsreporting = Analyticsreporting;
class Resource$Reports {
constructor(root) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
batchGet(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback || {});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://analyticsreporting.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v4/reports:batchGet')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
analyticsreporting_v4.Resource$Reports = Resource$Reports;
})(analyticsreporting_v4 = exports.analyticsreporting_v4 || (exports.analyticsreporting_v4 = {}));
//# sourceMappingURL=v4.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"v4.js","sourceRoot":"","sources":["../../../../src/apis/analyticsreporting/v4.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAIH,yDAA2H;AAE3H,yBAAyB;AACzB,6BAA6B;AAC7B,gCAAgC;AAChC,+BAA+B;AAC/B,+BAA+B;AAE/B,IAAiB,qBAAqB,CAy/BrC;AAz/BD,WAAiB,qBAAqB;IAKpC;;;;;;;;;;;;;;OAcG;IACH,MAAa,kBAAkB;QAO7B,YAAY,OAAsB,EAAE,MAA2B;YAJ/D,SAAI,GAAG,IAAI,CAAC;YAKV,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAExB,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;KACF;IAlBY,wCAAkB,qBAkB9B,CAAA;IAw3BD,MAAa,gBAAgB;QAE3B,YAAY,IAAwB;YAClC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QA0BD,QAAQ,CACJ,gBAC+C,EAC/C,iBAC+C,EAC/C,QAA0D;YAE5D,IAAI,MAAM,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAqC,CAAC;YAC1E,IAAI,OAAO,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAkB,CAAC;YAEzD,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;gBAC1C,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM,GAAG,EAAsC,CAAC;gBAChD,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACT,OAAO,CAAC,OAAO,IAAI,4CAA4C,CAAC;YACpE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAClB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,sBAAsB,CAAC;yBAC7B,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;oBACvC,MAAM,EAAE,MAAM;iBACf,EACD,OAAO,CAAC;gBACZ,MAAM;gBACN,cAAc,EAAE,EAAE;gBAClB,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;aACxB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,oCAAgB,CAA4B,UAAU,EAAE,QAAQ,CAAC,CAAC;aACnE;iBAAM;gBACL,OAAO,oCAAgB,CAA4B,UAAU,CAAC,CAAC;aAChE;QACH,CAAC;KACF;IA7EY,sCAAgB,mBA6E5B,CAAA;AAcH,CAAC,EAz/BgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAy/BrC"}

View File

@ -0,0 +1,27 @@
<img src="https://avatars0.githubusercontent.com/u/1342004?v=3&s=96" alt="Google Inc. logo" title="Google" align="right" height="96" width="96"/>
# @google/androiddeviceprovisioning
> Automates Android zero-touch enrollment for device resellers, customers, and EMMs.
## Installation
```sh
$ npm install @google/androiddeviceprovisioning
```
## Usage
All documentation and usage information can be found on [GitHub](https://github.com/google/google-api-nodejs-client).
## License
This library is licensed under Apache 2.0. Full license text is available in [COPYING](https://github.com/google/google-api-nodejs-client/blob/master/COPYING).
## Contributing
We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
## Questions/problems?
* Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
* If you've found an bug/issue, please [file it on GitHub](https://github.com/google/google-api-nodejs-client/issues).
*Crafted with ❤️ by the Google Node.js team*

View File

@ -0,0 +1,6 @@
import { androiddeviceprovisioning_v1 } from './v1';
export declare const VERSIONS: {
'v1': typeof androiddeviceprovisioning_v1.Androiddeviceprovisioning;
};
export declare function androiddeviceprovisioning(version: 'v1'): androiddeviceprovisioning_v1.Androiddeviceprovisioning;
export declare function androiddeviceprovisioning(options: androiddeviceprovisioning_v1.Options): androiddeviceprovisioning_v1.Androiddeviceprovisioning;

View File

@ -0,0 +1,25 @@
"use strict";
// Copyright 2018, Google, LLC.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
/*! THIS FILE IS AUTO-GENERATED */
const googleapis_common_1 = require("googleapis-common");
const v1_1 = require("./v1");
exports.VERSIONS = {
'v1': v1_1.androiddeviceprovisioning_v1.Androiddeviceprovisioning,
};
function androiddeviceprovisioning(versionOrOptions) {
return googleapis_common_1.getAPI('androiddeviceprovisioning', versionOrOptions, exports.VERSIONS, this);
}
exports.androiddeviceprovisioning = androiddeviceprovisioning;
//# sourceMappingURL=index.js.map

Some files were not shown because too many files have changed in this diff Show More