lbd_sdk 0.1.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f464551eba6200365069c1ba80d422a746e0ba869ae0473ef3c919ed82876e73
4
- data.tar.gz: 01a2ed334e9f1cdae2525f351354c552e5688faffc6e128782c16bfa827966b4
3
+ metadata.gz: ce658f1bab99457bca88bd4a6580d0542b1597ee2b476bbe6ff99c1079343758
4
+ data.tar.gz: 0215d9e0bff334785cb7ae4d165d6777fb5092c63e79189a81cb825021f9f6bf
5
5
  SHA512:
6
- metadata.gz: 1cc3d4d3bec1aad18027755b8e6092543fe2511ffcf91ed039c734f66a5be5cccd784e656b7cd4aa725c92f3755ff39a0cc5e3ad7519aeabeafc72cf5161c66f
7
- data.tar.gz: 57ec0a30603dd83e31b75bea1e59df3f53c33d2538eba3fe0691faee920e2101585fa158b10a943d2adc241743ed838379bbc638e710c6e688471ae1d23bf567
6
+ metadata.gz: fbfa09e390182cf084433e689c02fc30ee6b40e5ac08e3b07f9e6b13681901b82f03874103562fe6874354b871ae9a40a4026560232dff0a7fc39345c8f91573
7
+ data.tar.gz: c2297feb00a215cb64d2bb812053d78448156b9e41ba4265be4f8222184cecbe78c3df44421fb475abb3e89d7729e6d911a9e1d0930fc16736bf198a4fb708ab
data/.gitignore CHANGED
@@ -7,4 +7,5 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  .ruby-version
10
- node_modules/
10
+ node_modules/
11
+ tmp_console.md
data/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # 0.1.4(2022-07-02)
2
+
3
+ ## Add new endpoints
4
+
5
+ - Add `GET /v1/item-tokens/{contractId}/fungibles/thumbnails/{request-id}/status`
6
+ - Add `PUT /v1/item-tokens/{contractId}/fungibles/thumbnails`
7
+ - Add `GET /v1/item-tokens/{contractId}/fungibles/media-resources/{request-id}/status`
8
+ - Add `PUT /v1/item-tokens/{contractId}/fungibles/media-resources`
9
+ - Add `GET /v1/item-tokens/{contractId}/non-fungibles/thumbnails/{request-id}/status`
10
+ - Add `PUT /v1/item-tokens/{contractId}/non-fungibles/thumbnails`
11
+ - Add `GET /v1/item-tokens/{contractId}/non-fungibles/media-resources/{request-id}/status`
12
+ - Add `PUT /v1/item-tokens/{contractId}/non-fungibles/media-resources`
13
+
14
+ ## Delete deprecated endpoints
15
+
16
+ - Delete `GET /v1/item-tokens/{contractId}/fungibles/icon/{request-id}/status`
17
+ - Delete `PUT /v1/item-tokens/{contractId}/fungibles/icon`
18
+ - Delete `GET /v1/item-tokens/{contractId}/non-fungibles/icon/{request-id}/status`
19
+ - Delete `PUT /v1/item-tokens/{contractId}/non-fungibles/icon`
20
+
1
21
  # 0.1.3(2022-03-23)
2
22
 
3
23
  - Add `GET /v1/item-tokens`.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lbd_sdk (0.1.3)
4
+ lbd_sdk (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -104,14 +104,18 @@ client.burn_non_fungible_token(
104
104
  - [x] GET /v1/item-tokens/{contractId}/non-fungibles/{tokenType}/{tokenIndex}/holder
105
105
  - [x] GET /v1/item-tokens/{contractId}/non-fungibles/{tokenType}/{tokenIndex}/children
106
106
  - [x] GET /v1/item-tokens/{contractId}/non-fungibles/{tokenType}/{tokenIndex}/parent
107
+ - [x] GET /v1/item-tokens/{contractId}/fungibles/thumbnails/{request-id}/status
108
+ - [x] PUT /v1/item-tokens/{contractId}/fungibles/thumbnails
109
+ - [x] GET /v1/item-tokens/{contractId}/fungibles/media-resources/{request-id}/status
110
+ - [x] PUT /v1/item-tokens/{contractId}/fungibles/media-resources
111
+ - [x] GET /v1/item-tokens/{contractId}/non-fungibles/thumbnails/{request-id}/status
112
+ - [x] PUT /v1/item-tokens/{contractId}/non-fungibles/thumbnails
113
+ - [x] GET /v1/item-tokens/{contractId}/non-fungibles/media-resources/{request-id}/status
114
+ - [x] PUT /v1/item-tokens/{contractId}/non-fungibles/media-resources
107
115
  - [x] GET /v1/item-tokens/{contractId}/non-fungibles/{tokenType}/{tokenIndex}/root
108
- - [x] GET /v1/item-tokens/{contractId}/fungibles/icon/{request-id}/status
109
- - [x] GET /v1/item-tokens/{contractId}/non-fungibles/icon/{request-id}/status
110
116
  - [x] PUT /v1/item-tokens/{contractId}/fungibles/{tokenType}
111
- - [x] PUT /v1/item-tokens/{contractId}/fungibles/icon
112
117
  - [x] PUT /v1/item-tokens/{contractId}/non-fungibles/{tokenType}
113
118
  - [x] PUT /v1/item-tokens/{contractId}/non-fungibles/{tokenType}/{tokenIndex}
114
- - [x] PUT /v1/item-tokens/{contractId}/non-fungibles/icon
115
119
  - [x] POST /v1/item-tokens/{contractId}/non-fungibles/{tokenType}/{tokenIndex}/parent
116
120
  - [x] DELETE /v1/item-tokens/{contractId}/non-fungibles/{tokenType}/{tokenIndex}/parent
117
121
  - [x] POST /v1/item-tokens/{contractId}/fungibles
@@ -175,6 +179,14 @@ To work prettier, run `npm i -D @prettier/plugin-ruby`.
175
179
 
176
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).
177
181
 
182
+ ## Release
183
+
184
+ ```
185
+ bundle exec rake build
186
+ git push origin <branch>
187
+ bundle exec rake release
188
+ ```
189
+
178
190
  ## Contributing
179
191
 
180
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).
@@ -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: non_fungible_token_create_update_request(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: non_fungible_token_create_update_request(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: non_fungible_token_create_update_request(payload),
567
+ payload: non_fungible_token_update_request(payload),
568
568
  )
569
569
  end
570
570
 
@@ -634,12 +634,30 @@ module LbdSdk
634
634
  end
635
635
 
636
636
  def fungible_token_media_resources_update_status(contract_id, request_id)
637
- get("/v1/item-tokens/#{contract_id}/fungibles/icon/#{request_id}/status")
637
+ get(
638
+ "/v1/item-tokens/#{contract_id}/fungibles/media-resources/#{request_id}/status",
639
+ )
638
640
  end
639
641
 
640
642
  def update_fungible_token_media_resources(contract_id, token_types)
641
643
  put(
642
- "/v1/item-tokens/#{contract_id}/fungibles/icon",
644
+ "/v1/item-tokens/#{contract_id}/fungibles/media-resources",
645
+ payload: fungible_token_media_resources_request(token_types),
646
+ )
647
+ end
648
+
649
+ def fungible_token_thumbnail_resources_update_statuses(
650
+ contract_id,
651
+ request_id
652
+ )
653
+ get(
654
+ "/v1/item-tokens/#{contract_id}/fungibles/thumbnails/#{request_id}/status",
655
+ )
656
+ end
657
+
658
+ def update_fungible_token_thumbnail_resources(contract_id, token_types)
659
+ put(
660
+ "/v1/item-tokens/#{contract_id}/fungibles/thumbnails",
643
661
  payload: fungible_token_media_resources_request(token_types),
644
662
  )
645
663
  end
@@ -649,13 +667,29 @@ module LbdSdk
649
667
  request_id
650
668
  )
651
669
  get(
652
- "/v1/item-tokens/#{contract_id}/non-fungibles/icon/#{request_id}/status",
670
+ "/v1/item-tokens/#{contract_id}/non-fungibles/media-resources/#{request_id}/status",
653
671
  )
654
672
  end
655
673
 
656
674
  def update_non_fungible_token_media_resources(contract_id, token_ids)
657
675
  put(
658
- "/v1/item-tokens/#{contract_id}/non-fungibles/icon",
676
+ "/v1/item-tokens/#{contract_id}/non-fungibles/media-resources",
677
+ payload: non_fungible_token_media_resources_request(token_ids),
678
+ )
679
+ end
680
+
681
+ def non_fungible_token_thumbnail_resources_update_statuses(
682
+ contract_id,
683
+ request_id
684
+ )
685
+ get(
686
+ "/v1/item-tokens/#{contract_id}/non-fungibles/thumbnails/#{request_id}/status",
687
+ )
688
+ end
689
+
690
+ def update_non_fungible_token_thumbnail_resources(contract_id, token_ids)
691
+ put(
692
+ "/v1/item-tokens/#{contract_id}/non-fungibles/thumbnails",
659
693
  payload: non_fungible_token_media_resources_request(token_ids),
660
694
  )
661
695
  end
@@ -415,9 +415,24 @@ module LbdSdk
415
415
  params
416
416
  end
417
417
 
418
- def non_fungible_token_create_update_request(options)
419
- if options[:owner_address].nil? || options[:owner_secret].nil? ||
420
- options[:name].nil?
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LbdSdk
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.5'
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.3
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-03-23 00:00:00.000000000 Z
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.