-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d70df3d
Showing
16 changed files
with
10,306 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"presets": ["es2015", "stage-0"], | ||
"plugins": ["add-module-exports"], | ||
"env": { | ||
"test": { | ||
"plugins": ["istanbul"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": "standard" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
coverage | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"include": ["src/**/*.js"], | ||
"require": ["babel-register"], | ||
"sourceMap": false, | ||
"instrument": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# awqlqb | ||
|
||
[![NPM version][npm-image]][npm-url] | ||
|
||
> AdWords Query Language query builder for JavaScript | ||
A query builder that helps you simply make [AdWords Query String](https://developers.google.com/adwords/api/docs/guides/awql) to AdWords' [API](https://developers.google.com/adwords/api/docs/guides/start) for fetching data that you want. | ||
|
||
## Install | ||
|
||
```shell | ||
$ yarn add awqlqb | ||
``` | ||
|
||
```js | ||
const AWQLQB = require('AWQLQB') | ||
``` | ||
|
||
## Usage | ||
|
||
### A basic example | ||
|
||
```js | ||
const AWQLQB = require('AWQLQB') | ||
|
||
const awql = new AWQLQB() | ||
|
||
const str = awql | ||
.select(['VideoId', 'Clicks']) | ||
.from('VIDEO_PERFORMANCE_REPORT') | ||
.where({ field: 'VideoId', operator: 'IN', value: ['1234'] }) | ||
.during({ since: '20181001', until: '20181018' }) | ||
.asAWQL() | ||
|
||
console.log(str) | ||
|
||
// SELECT VideoId, Clicks FROM VIDEO_PERFORMANCE_REPORT WHERE VideoId IN ['1234'] DURING 20181001, 20181018 | ||
``` | ||
|
||
## Note | ||
|
||
Inspired by [FQB](https://github.com/chunkai1312/fqb) | ||
|
||
## Reference | ||
|
||
[AWQL Intoduction](https://developers.google.com/adwords/api/docs/guides/awql) | ||
|
||
[npm-image]: https://img.shields.io/npm/v/fqb.svg | ||
[npm-url]: https://npmjs.org/package/fqb |
Oops, something went wrong.