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 +4 -4
- data/.github/workflows/pull-request.yml +1 -1
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -0
- data/lib/lbd_sdk/client.rb +21 -0
- data/lib/lbd_sdk/request.rb +2 -1
- data/lib/lbd_sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fc6f61507f7ea43d1bc0a23d90a5715a41c120e8af4fbcc7d252ff91db94b36
|
4
|
+
data.tar.gz: e605084332cb992f7c41d9c75c82224050bbaf6e3049c1f28d35a0f27fb78bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6798a3454dd3a8295e4d068ac045e446fd1637a0292127f36d9d820c7af6e8320eab17736cd959a6ca2be393bacdcc75a2905fced43ddd735eddf60ee3f9557
|
7
|
+
data.tar.gz: 3d9eefa14e3dc3ff89bfc8e64d8b36acfc710ec6e5b228a033cf0c91965cfc208c9f3ec654d7d9dcc95e2dcf2606a94b4330723cb2f58a27b0a45de56764be82
|
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
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
|
data/lib/lbd_sdk/client.rb
CHANGED
@@ -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
|
data/lib/lbd_sdk/request.rb
CHANGED
@@ -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
|
|
data/lib/lbd_sdk/version.rb
CHANGED
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.
|
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:
|
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.
|