lbd_sdk 0.1.4 → 0.1.5
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/.gitignore +2 -1
- data/Gemfile.lock +1 -1
- data/README.md +8 -0
- data/lib/lbd_sdk/client.rb +3 -3
- data/lib/lbd_sdk/request.rb +19 -4
- 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: ce658f1bab99457bca88bd4a6580d0542b1597ee2b476bbe6ff99c1079343758
|
4
|
+
data.tar.gz: 0215d9e0bff334785cb7ae4d165d6777fb5092c63e79189a81cb825021f9f6bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbfa09e390182cf084433e689c02fc30ee6b40e5ac08e3b07f9e6b13681901b82f03874103562fe6874354b871ae9a40a4026560232dff0a7fc39345c8f91573
|
7
|
+
data.tar.gz: c2297feb00a215cb64d2bb812053d78448156b9e41ba4265be4f8222184cecbe78c3df44421fb475abb3e89d7729e6d911a9e1d0930fc16736bf198a4fb708ab
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -179,6 +179,14 @@ To work prettier, run `npm i -D @prettier/plugin-ruby`.
|
|
179
179
|
|
180
180
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
181
181
|
|
182
|
+
## Release
|
183
|
+
|
184
|
+
```
|
185
|
+
bundle exec rake build
|
186
|
+
git push origin <branch>
|
187
|
+
bundle exec rake release
|
188
|
+
```
|
189
|
+
|
182
190
|
## Contributing
|
183
191
|
|
184
192
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lbd_sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/YuheiNakasaka/lbd_sdk_rb/blob/main/CODE_OF_CONDUCT.md).
|
data/lib/lbd_sdk/client.rb
CHANGED
@@ -501,7 +501,7 @@ module LbdSdk
|
|
501
501
|
def create_non_fungible_token(contract_id, payload = {})
|
502
502
|
post(
|
503
503
|
"/v1/item-tokens/#{contract_id}/non-fungibles",
|
504
|
-
payload:
|
504
|
+
payload: non_fungible_token_create_request(payload),
|
505
505
|
)
|
506
506
|
end
|
507
507
|
|
@@ -552,7 +552,7 @@ module LbdSdk
|
|
552
552
|
def update_non_fungible_token_type(contract_id, token_type, payload = {})
|
553
553
|
put(
|
554
554
|
"/v1/item-tokens/#{contract_id}/non-fungibles/#{token_type}",
|
555
|
-
payload:
|
555
|
+
payload: non_fungible_token_update_request(payload),
|
556
556
|
)
|
557
557
|
end
|
558
558
|
|
@@ -564,7 +564,7 @@ module LbdSdk
|
|
564
564
|
)
|
565
565
|
put(
|
566
566
|
"/v1/item-tokens/#{contract_id}/non-fungibles/#{token_type}/#{token_index}",
|
567
|
-
payload:
|
567
|
+
payload: non_fungible_token_update_request(payload),
|
568
568
|
)
|
569
569
|
end
|
570
570
|
|
data/lib/lbd_sdk/request.rb
CHANGED
@@ -415,9 +415,24 @@ module LbdSdk
|
|
415
415
|
params
|
416
416
|
end
|
417
417
|
|
418
|
-
def
|
419
|
-
if options[:owner_address].nil? || options[:owner_secret].nil?
|
420
|
-
|
418
|
+
def non_fungible_token_create_request(options)
|
419
|
+
if options[:owner_address].nil? || options[:owner_secret].nil?
|
420
|
+
raise ArgumentError,
|
421
|
+
'owner_address and owner_secret and name are required'
|
422
|
+
end
|
423
|
+
|
424
|
+
params = {
|
425
|
+
ownerAddress: options[:owner_address],
|
426
|
+
ownerSecret: options[:owner_secret],
|
427
|
+
}
|
428
|
+
|
429
|
+
params[:name] = options[:name] if !options[:name].nil?
|
430
|
+
params[:meta] = options[:meta] if !options[:meta].nil?
|
431
|
+
params
|
432
|
+
end
|
433
|
+
|
434
|
+
def non_fungible_token_update_request(options)
|
435
|
+
if options[:owner_address].nil? || options[:owner_secret].nil?
|
421
436
|
raise ArgumentError,
|
422
437
|
'owner_address and owner_secret and name are required'
|
423
438
|
end
|
@@ -425,9 +440,9 @@ module LbdSdk
|
|
425
440
|
params = {
|
426
441
|
ownerAddress: options[:owner_address],
|
427
442
|
ownerSecret: options[:owner_secret],
|
428
|
-
name: options[:name],
|
429
443
|
}
|
430
444
|
|
445
|
+
params[:name] = options[:name] if !options[:name].nil?
|
431
446
|
params[:meta] = options[:meta] if !options[:meta].nil?
|
432
447
|
params
|
433
448
|
end
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YuheiNakasaka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-12 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.
|