altadata 0.0.3 → 0.1.0

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
  SHA256:
3
- metadata.gz: 3b53f46a2f3018f4f6a27e3f61799fb5826f396512891c3bf81e91b2dd4d9afd
4
- data.tar.gz: c22553079c9bebbcf5fb35ac1c08da3879e574e4723cd312448b639bd269bcfb
3
+ metadata.gz: 270b5532201ef3a8d7cb120c46ad25519f860779c6304f6aae071b67143cdd07
4
+ data.tar.gz: 7967fd392bde2383c65aafab465d4d1f338ea53e4c4a7b9b8fd14aebca2f49a2
5
5
  SHA512:
6
- metadata.gz: 589fff5372c880737e436fe2da282e22a033ee32c0af090c4436a2fb126c93d15f902ed32f7dbecd07d4602d602121b5333888b9522bf25804c3b5a53011c93d
7
- data.tar.gz: 53624332151579d1e2dc04779ac9610a0710cc89d4ce1ef63a01e0e938e07c53e01bab92da2ae7df5c4491b9312918daf456787d8e0908112d9f9ad0e0c6bb7e
6
+ metadata.gz: c51e1b61669f2744bb11269651854a805b67bccebb14b30d14a85149f833890f3fe3d44354e911337b1e30abdef752eccc3954844f160139dc3e5c298091ceb0
7
+ data.tar.gz: 4916aa808f5485f2289144a4e1def8dafc3ad603e9df94884ca1b603537a6b91a274d2f417015e9532cc734cf84d9332d62351701b387ed119b6b028c432ea34
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # ALTADATA Ruby Client
2
2
 
3
- [ALTADATA](https://www.altadata.io) Ruby gem provides convenient access to the ALTADATA API from applications written in the Ruby language.
3
+ [![Build Actions status](https://github.com/altabering/altadata-ruby/workflows/build/badge.svg)](https://github.com/altabering/altadata-ruby/actions)
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/altadata.svg)](https://badge.fury.io/rb/altadata)
6
+
7
+ [ALTADATA](https://www.altadata.io) Ruby gem provides convenient access to the ALTADATA API from applications written in the Ruby language. With this Ruby gem, developers can build applications around the ALTADATA API without having to deal with accessing and managing requests and responses.
4
8
 
5
9
  ## Installation
6
10
 
@@ -72,6 +76,17 @@ data =
72
76
  .load
73
77
  ```
74
78
 
79
+ ### not equal condition
80
+
81
+ ```ruby
82
+ PRODUCT_CODE = 'co_10_jhucs_03'
83
+
84
+ data =
85
+ client.get_data(product_code = PRODUCT_CODE)
86
+ .not_equal(condition_column = 'province_state', condition_value = 'Montana')
87
+ .load
88
+ ```
89
+
75
90
  ### in condition
76
91
 
77
92
  ```ruby
@@ -85,6 +100,19 @@ data =
85
100
 
86
101
  > condition_value parameter of condition_in method must be Array
87
102
 
103
+ ### not in condition
104
+
105
+ ```ruby
106
+ PRODUCT_CODE = 'co_10_jhucs_03'
107
+
108
+ data =
109
+ client.get_data(product_code = PRODUCT_CODE)
110
+ .condition_not_in(condition_column = 'province_state', condition_value = %w[Montana Utah Alabama])
111
+ .load
112
+ ```
113
+
114
+ > condition_value parameter of condition_not_in method must be Array
115
+
88
116
  ### sort operation
89
117
 
90
118
  ```ruby
@@ -98,7 +126,6 @@ data =
98
126
 
99
127
  > Default value of order_method parameter is 'asc' and order_method parameter must be 'asc' or 'desc'
100
128
 
101
-
102
129
  ### select specific columns
103
130
 
104
131
  ```ruby
@@ -17,7 +17,7 @@ module Altadata
17
17
 
18
18
  ##
19
19
  # Converts subscription api response to unnested version
20
- def fix_subscription_response(response_json)
20
+ def fix_response(response_json)
21
21
  data = []
22
22
 
23
23
  response_json.each do |product|
@@ -45,7 +45,7 @@ module Altadata
45
45
  def list_subscription
46
46
  response = Faraday.get(@subscription_api_url)
47
47
  response_json = JSON.parse(response.body)
48
- fix_subscription_response(response_json)
48
+ fix_response(response_json)
49
49
  end
50
50
 
51
51
  ##
@@ -220,5 +220,7 @@ module Altadata
220
220
 
221
221
  data
222
222
  end
223
+
224
+ private :fix_response, :check_parameter
223
225
  end
224
226
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Altadata
4
- VERSION = '0.0.3'
4
+ VERSION = '0.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: altadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ALTADATA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-24 00:00:00.000000000 Z
11
+ date: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday