Skip to content

Commit

Permalink
Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lili668668 committed Oct 19, 2018
0 parents commit d70df3d
Show file tree
Hide file tree
Showing 16 changed files with 10,306 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .babelrc
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"]
}
}
}
10 changes: 10 additions & 0 deletions .editorconfig
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
9 changes: 9 additions & 0 deletions .eslintrc
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"
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
coverage
.nyc_output
6 changes: 6 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"include": ["src/**/*.js"],
"require": ["babel-register"],
"sourceMap": false,
"instrument": false
}
49 changes: 49 additions & 0 deletions README.md
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
Loading

0 comments on commit d70df3d

Please sign in to comment.