lbd_sdk 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce658f1bab99457bca88bd4a6580d0542b1597ee2b476bbe6ff99c1079343758
4
- data.tar.gz: 0215d9e0bff334785cb7ae4d165d6777fb5092c63e79189a81cb825021f9f6bf
3
+ metadata.gz: 1fc6f61507f7ea43d1bc0a23d90a5715a41c120e8af4fbcc7d252ff91db94b36
4
+ data.tar.gz: e605084332cb992f7c41d9c75c82224050bbaf6e3049c1f28d35a0f27fb78bbb
5
5
  SHA512:
6
- metadata.gz: fbfa09e390182cf084433e689c02fc30ee6b40e5ac08e3b07f9e6b13681901b82f03874103562fe6874354b871ae9a40a4026560232dff0a7fc39345c8f91573
7
- data.tar.gz: c2297feb00a215cb64d2bb812053d78448156b9e41ba4265be4f8222184cecbe78c3df44421fb475abb3e89d7729e6d911a9e1d0930fc16736bf198a4fb708ab
6
+ metadata.gz: f6798a3454dd3a8295e4d068ac045e446fd1637a0292127f36d9d820c7af6e8320eab17736cd959a6ca2be393bacdcc75a2905fced43ddd735eddf60ee3f9557
7
+ data.tar.gz: 3d9eefa14e3dc3ff89bfc8e64d8b36acfc710ec6e5b228a033cf0c91965cfc208c9f3ec654d7d9dcc95e2dcf2606a94b4330723cb2f58a27b0a45de56764be82
@@ -7,7 +7,7 @@ jobs:
7
7
  runs-on: ubuntu-latest
8
8
  strategy:
9
9
  matrix:
10
- ruby: ["2.5", "2.6", "2.7", "3.0"]
10
+ ruby: ["2.6", "2.7", "3.0"]
11
11
  name: Ruby v${{ matrix.ruby }}
12
12
  steps:
13
13
  - uses: actions/checkout@v2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ # 0.1.6(2023-01-11)
2
+
3
+ ## Add new endpoints
4
+
5
+ - Add `GET /v2/users/{userId}/transactions`
6
+ - Add `GET /v2/wallets/{walletAddress}/transactions`
7
+ - Add `GET /v2/transactions/{txHash}`
8
+
9
+ ## Deprecate endpoints
10
+
11
+ - Add warning to `GET /v1/users/{userId}/transactions`
12
+ - Add warning to `GET /v1/wallets/{walletAddress}/transactions`
13
+ - Add warning to `GET /v1/transactions/{txHash}`
14
+
15
+ # 0.1.5(2022-10-12)
16
+
17
+ - Fix invalid validation to some parametars.
18
+
1
19
  # 0.1.4(2022-07-02)
2
20
 
3
21
  ## Add new endpoints
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lbd_sdk (0.1.5)
4
+ lbd_sdk (0.1.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -128,6 +128,7 @@ client.burn_non_fungible_token(
128
128
  - [x] POST /v1/item-tokens/{contractId}/non-fungibles/{tokenType}/{tokenIndex}/burn
129
129
  - [x] GET /v1/users/{userId}
130
130
  - [x] GET /v1/users/{userId}/transactions
131
+ - [x] GET /v2/users/{userId}/transactions
131
132
  - [x] GET /v1/users/{userId}/base-coin
132
133
  - [x] GET /v1/users/{userId}/service-tokens
133
134
  - [x] GET /v1/users/{userId}/service-tokens/{contractId}
@@ -152,6 +153,7 @@ client.burn_non_fungible_token(
152
153
  - [x] GET /v1/wallets
153
154
  - [x] GET /v1/wallets/{walletAddress}
154
155
  - [x] GET /v1/wallets/{walletAddress}/transactions
156
+ - [x] GET /v2/wallets/{walletAddress}/transactions
155
157
  - [x] GET /v1/wallets/{walletAddress}/base-coin
156
158
  - [x] GET /v1/wallets/{walletAddress}/service-tokens
157
159
  - [x] GET /v1/wallets/{walletAddress}/service-tokens/{contractId}
@@ -169,6 +171,7 @@ client.burn_non_fungible_token(
169
171
  - [x] GET /v1/memos/{txHash}
170
172
  - [x] GET /v1/time
171
173
  - [x] GET /v1/transactions/{txHash}
174
+ - [x] GET /v2/transactions/{txHash}
172
175
  - [ ] API payloads test. All payloads at least should be checked if the inputs are required or optional.
173
176
 
174
177
  ## Development
@@ -33,12 +33,20 @@ module LbdSdk
33
33
  end
34
34
 
35
35
  def user_transactions(user_id, query_params = {})
36
+ warn('[Deprecated] GET /v1/users/{userId}/transactions')
36
37
  get(
37
38
  "/v1/users/#{user_id}/transactions",
38
39
  query_params: transaction_page_request(query_params),
39
40
  )
40
41
  end
41
42
 
43
+ def user_transactions_v2(user_id, query_params = {})
44
+ get(
45
+ "/v2/users/#{user_id}/transactions",
46
+ query_params: transaction_page_request(query_params),
47
+ )
48
+ end
49
+
42
50
  def base_coin_balance_of_user(user_id)
43
51
  get("/v1/users/#{user_id}/base-coin")
44
52
  end
@@ -239,12 +247,20 @@ module LbdSdk
239
247
  end
240
248
 
241
249
  def wallet_transactions(wallet_address, query_params = {})
250
+ warn('[Deprecated] GET /v1/wallets/{walletAddress}/transactions')
242
251
  get(
243
252
  "/v1/wallets/#{wallet_address}/transactions",
244
253
  query_params: transaction_page_request(query_params),
245
254
  )
246
255
  end
247
256
 
257
+ def wallet_transactions_v2(wallet_address, query_params = {})
258
+ get(
259
+ "/v2/wallets/#{wallet_address}/transactions",
260
+ query_params: transaction_page_request(query_params),
261
+ )
262
+ end
263
+
248
264
  def base_coin_balance_of_wallet(wallet_address)
249
265
  get("/v1/wallets/#{wallet_address}/base-coin")
250
266
  end
@@ -703,9 +719,14 @@ module LbdSdk
703
719
  end
704
720
 
705
721
  def transaction_result(tx_hash)
722
+ warn('[Deprecated] GET /v1/transactions/{txHash}')
706
723
  get("/v1/transactions/#{tx_hash}")
707
724
  end
708
725
 
726
+ def transaction_result_v2(tx_hash)
727
+ get("/v2/transactions/#{tx_hash}")
728
+ end
729
+
709
730
  def httpclient
710
731
  HTTPClient.new
711
732
  end
@@ -28,11 +28,12 @@ module LbdSdk
28
28
  params = {
29
29
  limit: options[:limit] || 10,
30
30
  page: options[:page] || 1,
31
- orderBy: options[:order_by] || 'desc',
31
+ orderBy: options[:order_by] || options[:orderBy] || 'desc',
32
32
  }
33
33
  params[:before] = options[:before] if !options[:before].nil?
34
34
  params[:after] = options[:after] if !options[:after].nil?
35
35
  params[:msgType] = options[:msgType] if !options[:msgType].nil?
36
+ params[:msgType] = options[:msg_type] if !options[:msg_type].nil?
36
37
  params
37
38
  end
38
39
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LbdSdk
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lbd_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - YuheiNakasaka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-12 00:00:00.000000000 Z
11
+ date: 2023-01-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: LINE Blockchain Developer SDK for Ruby. This SDK is not official LINE
14
14
  SDK.