bigquery-client 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c980f0639eae7a6531f6da8685f0bcb383afa3b
4
- data.tar.gz: abd414579e6962e0ee7a4767f1b6093ad1973779
3
+ metadata.gz: 4a72ed82925d59afe55c4712320ac7ef7c8d9432
4
+ data.tar.gz: 6926b3af5110b3869a86b771d15eaca4d173a422
5
5
  SHA512:
6
- metadata.gz: 15b6cd2dff964d1d59e6443727a7c2cd52e556bb540c08e571df06d78b1fc73daca4c41a64d4a6d55f63b9728d235de18706b2ac2be70c4a3c7727a6ccd98a46
7
- data.tar.gz: a92d722dfdf1f444bb9141537c367226537c93e727f9f72578f7d381e9c01cbb3bab04f3ff8806c23d6c4e508a446b5d415f32d116e44941a223c8fff7019dd5
6
+ metadata.gz: f44875d3135a175ee079a84c181be2bda7ee3cd6b19eb6684648dc5e34adf3f8cfd2a492670cc1d8df7d9c2a5ad20b3b9cec0680f3a93babec6ac56b0eb19933
7
+ data.tar.gz: e473078ae2aff543169c68f160caf14dc5e51781cf4d3c16fc59389a9f758b98ec4f91dd307d45406a0aeeb6770943baa6e577614b7fc2d39f09c5b402d0347a
data/README.md CHANGED
@@ -11,7 +11,7 @@ A Ruby interface to the BigQuery API.
11
11
  % gem install bigquery-client
12
12
  ```
13
13
 
14
- ## Usage
14
+ ## Getting Started
15
15
 
16
16
  ```ruby
17
17
  require "bigquery-client"
@@ -25,6 +25,41 @@ client = BigQuery::Client.new(
25
25
  auth_method: "private_key"
26
26
  )
27
27
 
28
+ client.show hoge hoge
29
+
30
+ ```
31
+
32
+ ## Available API methods
33
+
34
+ ref. https://cloud.google.com/bigquery/docs/reference/v2/
35
+
36
+ | Resource type | Method | Function | Support |
37
+ |---------------|-----------------|--------------------|:---------------------:|
38
+ | Tables | delete | `drop_table` | :white_check_mark: |
39
+ | Tables | get | `fetch_table_info` | :white_check_mark: |
40
+ | Tables | get | `fetch_schema` | :white_check_mark: |
41
+ | Tables | insert | `create_table` | :white_check_mark: |
42
+ | Tables | list | `list_tables` | :white_check_mark: |
43
+ | Tables | patch | `patch_table` | :white_check_mark: |
44
+ | Tables | update | `update_table` | :white_check_mark: |
45
+ | Tabledata | insertAll | | :white_medium_square: |
46
+ | Tabledata | list | `list_table` | :white_check_mark: |
47
+ | Datasets | delete | | :white_medium_square: |
48
+ | Datasets | get | | :white_medium_square: |
49
+ | Datasets | insert | | :white_medium_square: |
50
+ | Datasets | list | `list_datasets` | :white_check_mark: |
51
+ | Datasets | patch | | :white_medium_square: |
52
+ | Datasets | update | | :white_medium_square: |
53
+ | Jobs | get | | :white_medium_square: |
54
+ | Jobs | getQueryResults | | :white_medium_square: |
55
+ | Jobs | insert | | :white_medium_square: |
56
+ | Jobs | list | | :white_medium_square: |
57
+ | Jobs | query | | :white_medium_square: |
58
+ | Projects | list | `list_projects` | :white_check_mark: |
59
+
60
+ ## Usage
61
+
62
+ ```ruby
28
63
  # insert
29
64
  client.insert("your_table", uid: "john", age: 42)
30
65
 
@@ -47,6 +82,12 @@ client.fetch_schema("your_table")
47
82
  #=> [{"name"=>"uid", "type"=>"STRING"}, {"name"=>"age", "type"=>"INTEGER"}]
48
83
  ```
49
84
 
85
+ ## TODO
86
+
87
+ - [ ] Support all API methods
88
+ - [ ] Support OAuth installed application credentials
89
+ - [ ] Google API discovery expiration
90
+
50
91
  ## Contributing
51
92
 
52
93
  1. Fork it ( https://github.com/ttanimichi/bigquery-client/fork )
@@ -2,5 +2,13 @@
2
2
 
3
3
  module BigQuery
4
4
  module Projects
5
+ def list_projects
6
+ result = access_api(
7
+ api_method: bigquery.projects.list,
8
+ parameters: {
9
+ }
10
+ )
11
+ JSON.parse(result.body)
12
+ end
5
13
  end
6
14
  end
@@ -1,5 +1,5 @@
1
1
  module BigQuery
2
2
  class Client
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigquery-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsukuru Tanimichi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-09 00:00:00.000000000 Z
11
+ date: 2015-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client