autorender 0.2.1 → 0.2.2
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/CHANGELOG.md +50 -43
- data/README.md +34 -6
- data/lib/autorender/internal/page_pagination.rb +35 -22
- data/lib/autorender/models/file_list_response.rb +103 -158
- data/lib/autorender/resources/files.rb +2 -1
- data/lib/autorender/version.rb +1 -1
- data/rbi/autorender/internal/page_pagination.rbi +29 -9
- data/rbi/autorender/models/file_list_response.rbi +80 -173
- data/rbi/autorender/resources/files.rbi +5 -1
- data/sig/autorender/internal/page_pagination.rbs +16 -5
- data/sig/autorender/models/file_list_response.rbs +83 -142
- data/sig/autorender/resources/files.rbs +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: defd4e8363dacdf1f19948eee28cc1af98be7d4d582fbe164f80da2c0653f2fd
|
|
4
|
+
data.tar.gz: 9eb9eca1bb6c55520f0a9d9f0e53a41f10da68a6a2dc68fdffaf87dffa7f2014
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 570081ccc7ceaa84f94ed9b4f28b4ccf7c99558f88e712934ad29f0a480b5c9e9b8ad7cd43bef16afd390d9f6dcfc148ed3c74f05e45c06b86d5ee7a3334d96c
|
|
7
|
+
data.tar.gz: ab593adc2d49f15766a5a1f5503ca8d507fbfb9211c5403b3e8d99152695ed04db921b343aeeef7dc658a57f6c53f39944d548dd436e9e65dbf12150a617ffd0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,79 +1,86 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.2.
|
|
3
|
+
## [0.2.2](https://github.com/autorender/autorender-ruby/compare/v0.2.1...v0.2.2) (2026-07-12)
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
### Chores
|
|
7
7
|
|
|
8
|
-
*
|
|
9
|
-
* strip internal workflows; preserve production-managed files ([0a1a663](https://github.com/autorenderhq/autorender-ruby/commit/0a1a663a70d3ac323769ca574a3e86d1c3cbbed4))
|
|
8
|
+
* rename autorenderhq -> autorender references (GitHub org rename) ([#11](https://github.com/autorender/autorender-ruby/issues/11)) ([36a12a6](https://github.com/autorender/autorender-ruby/commit/36a12a61bf4824ce266a5294911f74cd3075da6a))
|
|
10
9
|
|
|
11
|
-
## [0.2.
|
|
10
|
+
## [0.2.1](https://github.com/autorender/autorender-ruby/compare/v0.2.0...v0.2.1) (2026-06-29)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Chores
|
|
14
|
+
|
|
15
|
+
* remove Stainless attribution from README and SECURITY ([32ce08b](https://github.com/autorender/autorender-ruby/commit/32ce08b5603dd5e667b5eccccddf94fae9851e84))
|
|
16
|
+
* strip internal workflows; preserve production-managed files ([0a1a663](https://github.com/autorender/autorender-ruby/commit/0a1a663a70d3ac323769ca574a3e86d1c3cbbed4))
|
|
17
|
+
|
|
18
|
+
## [0.2.0](https://github.com/autorender/autorender-ruby/compare/v0.1.0...v0.2.0) (2026-06-12)
|
|
12
19
|
|
|
13
20
|
|
|
14
21
|
### Features
|
|
15
22
|
|
|
16
|
-
* **java:** enable maven publishing with release-please ([1786303](https://github.com/
|
|
17
|
-
* **ruby:** enable rubygems publishing with release-please ([bc8804f](https://github.com/
|
|
23
|
+
* **java:** enable maven publishing with release-please ([1786303](https://github.com/autorender/autorender-ruby/commit/1786303cbb54cff6672d54e610b9ade78c7c5854))
|
|
24
|
+
* **ruby:** enable rubygems publishing with release-please ([bc8804f](https://github.com/autorender/autorender-ruby/commit/bc8804f6dcb6942d92c55b45da53010aa0f7655a))
|
|
18
25
|
|
|
19
26
|
|
|
20
27
|
### Bug Fixes
|
|
21
28
|
|
|
22
|
-
* preserve production-managed files in release branch ([37f9bd5](https://github.com/
|
|
23
|
-
* strip internal workflows from production release branch ([cd8fd3f](https://github.com/
|
|
24
|
-
* update promote workflow and add back-sync from production ([8604ca6](https://github.com/
|
|
25
|
-
* use blob comparison in overlay; add language-specific version files ([383f0ae](https://github.com/
|
|
26
|
-
* use persist-credentials: false in sync workflow ([22a5b7c](https://github.com/
|
|
29
|
+
* preserve production-managed files in release branch ([37f9bd5](https://github.com/autorender/autorender-ruby/commit/37f9bd51d07018eff16ef491dc3fc4f747fc07ec))
|
|
30
|
+
* strip internal workflows from production release branch ([cd8fd3f](https://github.com/autorender/autorender-ruby/commit/cd8fd3f3dce0f1e02440ae92d9f5f6f5bd9fa087))
|
|
31
|
+
* update promote workflow and add back-sync from production ([8604ca6](https://github.com/autorender/autorender-ruby/commit/8604ca61b2b63aa688a5387fc2dd0b741996249d))
|
|
32
|
+
* use blob comparison in overlay; add language-specific version files ([383f0ae](https://github.com/autorender/autorender-ruby/commit/383f0ae3e39903225c4f22aecffb72b1745dba23))
|
|
33
|
+
* use persist-credentials: false in sync workflow ([22a5b7c](https://github.com/autorender/autorender-ruby/commit/22a5b7cd5104fa7addc8d8da5408a8aa53b6d542))
|
|
27
34
|
|
|
28
35
|
|
|
29
36
|
### Chores
|
|
30
37
|
|
|
31
|
-
* preserve production-managed files ([04101d4](https://github.com/
|
|
32
|
-
* remove staging-only workflows from production ([446e9ad](https://github.com/
|
|
33
|
-
* remove staging-only workflows from production ([79686f1](https://github.com/
|
|
34
|
-
* strip internal workflows; preserve production-managed files ([c2cb80d](https://github.com/
|
|
38
|
+
* preserve production-managed files ([04101d4](https://github.com/autorender/autorender-ruby/commit/04101d4aad8a09a5e00a383c35f9b7fb1bba3481))
|
|
39
|
+
* remove staging-only workflows from production ([446e9ad](https://github.com/autorender/autorender-ruby/commit/446e9ad2ca81b41c7d18f62bb341c2303c0906a5))
|
|
40
|
+
* remove staging-only workflows from production ([79686f1](https://github.com/autorender/autorender-ruby/commit/79686f15b7c6c5f130bc05e00e8fe595c4877236))
|
|
41
|
+
* strip internal workflows; preserve production-managed files ([c2cb80d](https://github.com/autorender/autorender-ruby/commit/c2cb80de0aab1a578c5798c3fd99efc8bf8f4b77))
|
|
35
42
|
|
|
36
43
|
|
|
37
44
|
### Documentation
|
|
38
45
|
|
|
39
|
-
* add auto-generated notice to CONTRIBUTING.md ([802ed52](https://github.com/
|
|
46
|
+
* add auto-generated notice to CONTRIBUTING.md ([802ed52](https://github.com/autorender/autorender-ruby/commit/802ed521f5609bfedbc004c755835a97b060eff0))
|
|
40
47
|
|
|
41
|
-
## [0.1.0](https://github.com/
|
|
48
|
+
## [0.1.0](https://github.com/autorender/autorender-ruby/compare/v0.0.1...v0.1.0) (2026-05-25)
|
|
42
49
|
|
|
43
50
|
|
|
44
51
|
### Features
|
|
45
52
|
|
|
46
|
-
* add stlc generate workflow and setup-stlc action ([33702ec](https://github.com/
|
|
47
|
-
* add test CI job ([a8fbe66](https://github.com/
|
|
48
|
-
* **api:** api update ([5e0fc16](https://github.com/
|
|
49
|
-
* **api:** api update ([6dc9820](https://github.com/
|
|
50
|
-
* **api:** api update ([dd609a7](https://github.com/
|
|
51
|
-
* **api:** api update ([4cc94ad](https://github.com/
|
|
52
|
-
* **api:** api update ([c8a41c7](https://github.com/
|
|
53
|
-
* **api:** api update ([0e228df](https://github.com/
|
|
54
|
-
* **api:** api update ([4367475](https://github.com/
|
|
55
|
-
* **api:** api update ([a9470bb](https://github.com/
|
|
56
|
-
* **api:** api update ([df3c1b1](https://github.com/
|
|
57
|
-
* **api:** api update ([fb07d3e](https://github.com/
|
|
58
|
-
* initial stlc build ([8972f10](https://github.com/
|
|
59
|
-
* support setting headers via env ([3707a7d](https://github.com/
|
|
53
|
+
* add stlc generate workflow and setup-stlc action ([33702ec](https://github.com/autorender/autorender-ruby/commit/33702eca050ca28e7f94e57cfec04b73f23c9df5))
|
|
54
|
+
* add test CI job ([a8fbe66](https://github.com/autorender/autorender-ruby/commit/a8fbe662d965ca5f29d9e3c6c22d566f4c2a8fc1))
|
|
55
|
+
* **api:** api update ([5e0fc16](https://github.com/autorender/autorender-ruby/commit/5e0fc16a5851c3352fbde1e93e7dfe113c01174d))
|
|
56
|
+
* **api:** api update ([6dc9820](https://github.com/autorender/autorender-ruby/commit/6dc98208876904a00fe6060c77bf37444402772b))
|
|
57
|
+
* **api:** api update ([dd609a7](https://github.com/autorender/autorender-ruby/commit/dd609a73898016e39ade678854a3eeeaa2b48238))
|
|
58
|
+
* **api:** api update ([4cc94ad](https://github.com/autorender/autorender-ruby/commit/4cc94adc26ad538f01d79808130029bd744a2ee3))
|
|
59
|
+
* **api:** api update ([c8a41c7](https://github.com/autorender/autorender-ruby/commit/c8a41c7d7564bc736de43fa4c791608348bdb0f7))
|
|
60
|
+
* **api:** api update ([0e228df](https://github.com/autorender/autorender-ruby/commit/0e228df68c6f36ce4daa497df77bbb053c2244f7))
|
|
61
|
+
* **api:** api update ([4367475](https://github.com/autorender/autorender-ruby/commit/4367475283baab31f04e1617ea462ae8784758d1))
|
|
62
|
+
* **api:** api update ([a9470bb](https://github.com/autorender/autorender-ruby/commit/a9470bb8ea34fd597ba981dd1aedbceda9bd0210))
|
|
63
|
+
* **api:** api update ([df3c1b1](https://github.com/autorender/autorender-ruby/commit/df3c1b1561943ccc9de1b51abe60adabcd576aa8))
|
|
64
|
+
* **api:** api update ([fb07d3e](https://github.com/autorender/autorender-ruby/commit/fb07d3eff80815340117fca67aae513e3a91b987))
|
|
65
|
+
* initial stlc build ([8972f10](https://github.com/autorender/autorender-ruby/commit/8972f10cca09ae385f9757795c55e658923c949b))
|
|
66
|
+
* support setting headers via env ([3707a7d](https://github.com/autorender/autorender-ruby/commit/3707a7d00abf789957185ad54eeddca000b3e398))
|
|
60
67
|
|
|
61
68
|
|
|
62
69
|
### Bug Fixes
|
|
63
70
|
|
|
64
|
-
* **client:** elide content type header on requests without body ([553ad30](https://github.com/
|
|
65
|
-
* patch multipart buffer replay, bodyless DELETE content-type, and test adapter ([eb66723](https://github.com/
|
|
66
|
-
* **python:** rename pagination field has_next_page -> has_next to fix pyright lint ([d49e480](https://github.com/
|
|
67
|
-
* restore content-type stripping and eager multipart buffering ([a67c6fb](https://github.com/
|
|
68
|
-
* restore content-type stripping and eager multipart buffering ([5ae6d69](https://github.com/
|
|
69
|
-
* restore content-type stripping and eager multipart buffering for retries ([8fc3542](https://github.com/
|
|
70
|
-
* restore content-type stripping and eager multipart buffering for retries ([c1ea3dd](https://github.com/
|
|
71
|
-
* restore content-type stripping and eager multipart buffering for retries ([16b199f](https://github.com/
|
|
72
|
-
* **test:** pass body as String to ReadIOAdapter so CGI can multi-read ([09e3684](https://github.com/
|
|
73
|
-
* update FakeCGI test helper to handle buffered String body ([b0bd179](https://github.com/
|
|
71
|
+
* **client:** elide content type header on requests without body ([553ad30](https://github.com/autorender/autorender-ruby/commit/553ad304fe2053211d95d0cefce4ed9c922f1d92))
|
|
72
|
+
* patch multipart buffer replay, bodyless DELETE content-type, and test adapter ([eb66723](https://github.com/autorender/autorender-ruby/commit/eb667233b4b537e158d25f357bf91adee5304675))
|
|
73
|
+
* **python:** rename pagination field has_next_page -> has_next to fix pyright lint ([d49e480](https://github.com/autorender/autorender-ruby/commit/d49e480c617a82896affa131551605b80ab84004))
|
|
74
|
+
* restore content-type stripping and eager multipart buffering ([a67c6fb](https://github.com/autorender/autorender-ruby/commit/a67c6fb5b4e7efc52152d6a8d9b642e198ab406b))
|
|
75
|
+
* restore content-type stripping and eager multipart buffering ([5ae6d69](https://github.com/autorender/autorender-ruby/commit/5ae6d69493de87916ed23ddaf7753fae116a4aa8))
|
|
76
|
+
* restore content-type stripping and eager multipart buffering for retries ([8fc3542](https://github.com/autorender/autorender-ruby/commit/8fc3542cbd8a1a5df00057846b890dbb2f1fde24))
|
|
77
|
+
* restore content-type stripping and eager multipart buffering for retries ([c1ea3dd](https://github.com/autorender/autorender-ruby/commit/c1ea3dd618ab041d7753b6d7ec0b99a5f94c349f))
|
|
78
|
+
* restore content-type stripping and eager multipart buffering for retries ([16b199f](https://github.com/autorender/autorender-ruby/commit/16b199ff3f5541ace9bc55bee9724db1c398c153))
|
|
79
|
+
* **test:** pass body as String to ReadIOAdapter so CGI can multi-read ([09e3684](https://github.com/autorender/autorender-ruby/commit/09e3684b6a6e9a921f4bf2ea2927d360622b5189))
|
|
80
|
+
* update FakeCGI test helper to handle buffered String body ([b0bd179](https://github.com/autorender/autorender-ruby/commit/b0bd179fb8ac25c6953fc75db832fe2ab734dd16))
|
|
74
81
|
|
|
75
82
|
|
|
76
83
|
### Chores
|
|
77
84
|
|
|
78
|
-
* **internal:** more robust bootstrap script ([127a1d1](https://github.com/
|
|
79
|
-
* **tests:** bump steady to v0.22.1 ([9ddf2e0](https://github.com/
|
|
85
|
+
* **internal:** more robust bootstrap script ([127a1d1](https://github.com/autorender/autorender-ruby/commit/127a1d1ae9215aff1f662e563de5dc48d269115e))
|
|
86
|
+
* **tests:** bump steady to v0.22.1 ([9ddf2e0](https://github.com/autorender/autorender-ruby/commit/9ddf2e0d1b60a4dd82f50d6c6c74e6e901c01e11))
|
data/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Autorender Ruby API library
|
|
2
2
|
|
|
3
|
-
The Autorender Ruby library provides convenient access to the Autorender REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/
|
|
3
|
+
The Autorender Ruby library provides convenient access to the Autorender REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/autorender/autorender-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
|
|
4
4
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
7
7
|
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/autorender).
|
|
8
8
|
|
|
9
|
-
The REST API documentation can be found on [autorender.
|
|
9
|
+
The REST API documentation can be found on [autorender.io](https://autorender.io/docs).
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
15
15
|
<!-- x-release-please-start-version -->
|
|
16
16
|
|
|
17
17
|
```ruby
|
|
18
|
-
gem "autorender", "~> 0.2.
|
|
18
|
+
gem "autorender", "~> 0.2.2"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-end -->
|
|
@@ -30,9 +30,37 @@ autorender = Autorender::Client.new(
|
|
|
30
30
|
api_key: ENV["AUTORENDER_API_KEY"] # This is the default and can be omitted
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
page = autorender.files.list(limit: 10)
|
|
34
34
|
|
|
35
|
-
puts(
|
|
35
|
+
puts(page.id)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Pagination
|
|
39
|
+
|
|
40
|
+
List methods in the Autorender API are paginated.
|
|
41
|
+
|
|
42
|
+
This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
page = autorender.files.list
|
|
46
|
+
|
|
47
|
+
# Fetch single item from page.
|
|
48
|
+
file = page.files[0]
|
|
49
|
+
puts(file.id)
|
|
50
|
+
|
|
51
|
+
# Automatically fetches more pages as needed.
|
|
52
|
+
page.auto_paging_each do |file|
|
|
53
|
+
puts(file.id)
|
|
54
|
+
end
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Alternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.
|
|
58
|
+
|
|
59
|
+
```ruby
|
|
60
|
+
if page.next_page?
|
|
61
|
+
new_page = page.next_page
|
|
62
|
+
puts(new_page.files[0].id)
|
|
63
|
+
end
|
|
36
64
|
```
|
|
37
65
|
|
|
38
66
|
### File uploads
|
|
@@ -261,4 +289,4 @@ Ruby 3.2.0 or higher.
|
|
|
261
289
|
|
|
262
290
|
## Contributing
|
|
263
291
|
|
|
264
|
-
See [the contributing documentation](https://github.com/
|
|
292
|
+
See [the contributing documentation](https://github.com/autorender/autorender-ruby/tree/main/CONTRIBUTING.md).
|
|
@@ -10,27 +10,21 @@ module Autorender
|
|
|
10
10
|
# end
|
|
11
11
|
#
|
|
12
12
|
# @example
|
|
13
|
-
# page_pagination.auto_paging_each do |
|
|
14
|
-
# puts(
|
|
13
|
+
# page_pagination.auto_paging_each do |file|
|
|
14
|
+
# puts(file)
|
|
15
15
|
# end
|
|
16
16
|
class PagePagination
|
|
17
17
|
include Autorender::Internal::Type::BasePage
|
|
18
18
|
|
|
19
19
|
# @return [Array<generic<Elem>>, nil]
|
|
20
|
-
attr_accessor :
|
|
20
|
+
attr_accessor :files
|
|
21
21
|
|
|
22
|
-
# @return [
|
|
23
|
-
attr_accessor :
|
|
24
|
-
|
|
25
|
-
# @return [Boolean]
|
|
26
|
-
attr_accessor :has_next
|
|
27
|
-
|
|
28
|
-
# @return [Integer]
|
|
29
|
-
attr_accessor :total_results
|
|
22
|
+
# @return [Meta]
|
|
23
|
+
attr_accessor :meta
|
|
30
24
|
|
|
31
25
|
# @return [Boolean]
|
|
32
26
|
def next_page?
|
|
33
|
-
|
|
27
|
+
meta&.has_next
|
|
34
28
|
end
|
|
35
29
|
|
|
36
30
|
# @raise [Autorender::HTTP::Error]
|
|
@@ -41,7 +35,7 @@ module Autorender
|
|
|
41
35
|
raise RuntimeError.new(message)
|
|
42
36
|
end
|
|
43
37
|
|
|
44
|
-
req = Autorender::Internal::Util.deep_merge(@req, {query: {page: (
|
|
38
|
+
req = Autorender::Internal::Util.deep_merge(@req, {query: {page: (meta&.page || 1).to_i.succ}})
|
|
45
39
|
@client.request(req)
|
|
46
40
|
end
|
|
47
41
|
|
|
@@ -55,7 +49,7 @@ module Autorender
|
|
|
55
49
|
|
|
56
50
|
page = self
|
|
57
51
|
loop do
|
|
58
|
-
page.
|
|
52
|
+
page.files&.each(&blk)
|
|
59
53
|
|
|
60
54
|
break unless page.next_page?
|
|
61
55
|
page = page.next_page
|
|
@@ -72,24 +66,43 @@ module Autorender
|
|
|
72
66
|
super
|
|
73
67
|
|
|
74
68
|
case page_data
|
|
75
|
-
in {
|
|
76
|
-
@
|
|
69
|
+
in {files: Array => files}
|
|
70
|
+
@files = files.map { Autorender::Internal::Type::Converter.coerce(@model, _1) }
|
|
71
|
+
else
|
|
72
|
+
end
|
|
73
|
+
case page_data
|
|
74
|
+
in {meta: Hash | nil => meta}
|
|
75
|
+
@meta = Autorender::Internal::Type::Converter.coerce(
|
|
76
|
+
Autorender::Internal::PagePagination::Meta,
|
|
77
|
+
meta
|
|
78
|
+
)
|
|
77
79
|
else
|
|
78
80
|
end
|
|
79
|
-
@current_page = page_data[:current_page]
|
|
80
|
-
@has_next = page_data[:has_next]
|
|
81
|
-
@total_results = page_data[:total_results]
|
|
82
81
|
end
|
|
83
82
|
|
|
84
83
|
# @api private
|
|
85
84
|
#
|
|
86
85
|
# @return [String]
|
|
87
86
|
def inspect
|
|
88
|
-
# rubocop:disable Layout/LineLength
|
|
89
87
|
model = Autorender::Internal::Type::Converter.inspect(@model, depth: 1)
|
|
90
88
|
|
|
91
|
-
"#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}
|
|
92
|
-
|
|
89
|
+
"#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
class Meta < Autorender::Internal::Type::BaseModel
|
|
93
|
+
# @!attribute has_next
|
|
94
|
+
#
|
|
95
|
+
# @return [Boolean, nil]
|
|
96
|
+
optional :has_next, Autorender::Internal::Type::Boolean, api_name: :hasNext
|
|
97
|
+
|
|
98
|
+
# @!attribute page
|
|
99
|
+
#
|
|
100
|
+
# @return [Integer, nil]
|
|
101
|
+
optional :page, Integer
|
|
102
|
+
|
|
103
|
+
# @!method initialize(has_next: nil, page: nil)
|
|
104
|
+
# @param has_next [Boolean]
|
|
105
|
+
# @param page [Integer]
|
|
93
106
|
end
|
|
94
107
|
end
|
|
95
108
|
end
|
|
@@ -4,164 +4,109 @@ module Autorender
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see Autorender::Resources::Files#list
|
|
6
6
|
class FileListResponse < Autorender::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute
|
|
8
|
-
#
|
|
9
|
-
# @return [
|
|
10
|
-
required :
|
|
11
|
-
|
|
12
|
-
# @!attribute
|
|
13
|
-
#
|
|
14
|
-
# @return [
|
|
15
|
-
required :
|
|
16
|
-
|
|
17
|
-
# @!
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
# @!method initialize(id:, created_at:, file_no:, folder_name:, folder_no:, format_:, height:, metadata:, mime_type:, name:, path:, size:, source:, tags:, updated_at:, url:, width:)
|
|
112
|
-
# @param id [String]
|
|
113
|
-
# @param created_at [Time]
|
|
114
|
-
# @param file_no [String]
|
|
115
|
-
# @param folder_name [String, nil]
|
|
116
|
-
# @param folder_no [String, nil]
|
|
117
|
-
# @param format_ [String, nil]
|
|
118
|
-
# @param height [Integer, nil]
|
|
119
|
-
# @param metadata [Hash{Symbol=>Object}, nil]
|
|
120
|
-
# @param mime_type [String]
|
|
121
|
-
# @param name [String]
|
|
122
|
-
# @param path [String]
|
|
123
|
-
# @param size [Integer]
|
|
124
|
-
# @param source [String]
|
|
125
|
-
# @param tags [Array<String>]
|
|
126
|
-
# @param updated_at [Time, nil]
|
|
127
|
-
# @param url [String]
|
|
128
|
-
# @param width [Integer, nil]
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
# @see Autorender::Models::FileListResponse#meta
|
|
132
|
-
class Meta < Autorender::Internal::Type::BaseModel
|
|
133
|
-
# @!attribute has_next
|
|
134
|
-
#
|
|
135
|
-
# @return [Boolean]
|
|
136
|
-
required :has_next, Autorender::Internal::Type::Boolean, api_name: :hasNext
|
|
137
|
-
|
|
138
|
-
# @!attribute has_prev
|
|
139
|
-
#
|
|
140
|
-
# @return [Boolean]
|
|
141
|
-
required :has_prev, Autorender::Internal::Type::Boolean, api_name: :hasPrev
|
|
142
|
-
|
|
143
|
-
# @!attribute limit
|
|
144
|
-
#
|
|
145
|
-
# @return [Integer]
|
|
146
|
-
required :limit, Integer
|
|
147
|
-
|
|
148
|
-
# @!attribute page
|
|
149
|
-
#
|
|
150
|
-
# @return [Integer]
|
|
151
|
-
required :page, Integer
|
|
152
|
-
|
|
153
|
-
# @!attribute total
|
|
154
|
-
#
|
|
155
|
-
# @return [Integer]
|
|
156
|
-
required :total, Integer
|
|
157
|
-
|
|
158
|
-
# @!method initialize(has_next:, has_prev:, limit:, page:, total:)
|
|
159
|
-
# @param has_next [Boolean]
|
|
160
|
-
# @param has_prev [Boolean]
|
|
161
|
-
# @param limit [Integer]
|
|
162
|
-
# @param page [Integer]
|
|
163
|
-
# @param total [Integer]
|
|
164
|
-
end
|
|
7
|
+
# @!attribute id
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
#
|
|
14
|
+
# @return [Time]
|
|
15
|
+
required :created_at, Time
|
|
16
|
+
|
|
17
|
+
# @!attribute file_no
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :file_no, String
|
|
21
|
+
|
|
22
|
+
# @!attribute folder_name
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
required :folder_name, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute folder_no
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
required :folder_no, String, nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute format_
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
required :format_, String, api_name: :format, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute height
|
|
38
|
+
#
|
|
39
|
+
# @return [Integer, nil]
|
|
40
|
+
required :height, Integer, nil?: true
|
|
41
|
+
|
|
42
|
+
# @!attribute metadata
|
|
43
|
+
#
|
|
44
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
45
|
+
required :metadata, Autorender::Internal::Type::HashOf[Autorender::Internal::Type::Unknown], nil?: true
|
|
46
|
+
|
|
47
|
+
# @!attribute mime_type
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
required :mime_type, String
|
|
51
|
+
|
|
52
|
+
# @!attribute name
|
|
53
|
+
#
|
|
54
|
+
# @return [String]
|
|
55
|
+
required :name, String
|
|
56
|
+
|
|
57
|
+
# @!attribute path
|
|
58
|
+
#
|
|
59
|
+
# @return [String]
|
|
60
|
+
required :path, String
|
|
61
|
+
|
|
62
|
+
# @!attribute size
|
|
63
|
+
#
|
|
64
|
+
# @return [Integer]
|
|
65
|
+
required :size, Integer
|
|
66
|
+
|
|
67
|
+
# @!attribute source
|
|
68
|
+
#
|
|
69
|
+
# @return [String]
|
|
70
|
+
required :source, String
|
|
71
|
+
|
|
72
|
+
# @!attribute tags
|
|
73
|
+
#
|
|
74
|
+
# @return [Array<String>]
|
|
75
|
+
required :tags, Autorender::Internal::Type::ArrayOf[String]
|
|
76
|
+
|
|
77
|
+
# @!attribute updated_at
|
|
78
|
+
#
|
|
79
|
+
# @return [Time, nil]
|
|
80
|
+
required :updated_at, Time, nil?: true
|
|
81
|
+
|
|
82
|
+
# @!attribute url
|
|
83
|
+
#
|
|
84
|
+
# @return [String]
|
|
85
|
+
required :url, String
|
|
86
|
+
|
|
87
|
+
# @!attribute width
|
|
88
|
+
#
|
|
89
|
+
# @return [Integer, nil]
|
|
90
|
+
required :width, Integer, nil?: true
|
|
91
|
+
|
|
92
|
+
# @!method initialize(id:, created_at:, file_no:, folder_name:, folder_no:, format_:, height:, metadata:, mime_type:, name:, path:, size:, source:, tags:, updated_at:, url:, width:)
|
|
93
|
+
# @param id [String]
|
|
94
|
+
# @param created_at [Time]
|
|
95
|
+
# @param file_no [String]
|
|
96
|
+
# @param folder_name [String, nil]
|
|
97
|
+
# @param folder_no [String, nil]
|
|
98
|
+
# @param format_ [String, nil]
|
|
99
|
+
# @param height [Integer, nil]
|
|
100
|
+
# @param metadata [Hash{Symbol=>Object}, nil]
|
|
101
|
+
# @param mime_type [String]
|
|
102
|
+
# @param name [String]
|
|
103
|
+
# @param path [String]
|
|
104
|
+
# @param size [Integer]
|
|
105
|
+
# @param source [String]
|
|
106
|
+
# @param tags [Array<String>]
|
|
107
|
+
# @param updated_at [Time, nil]
|
|
108
|
+
# @param url [String]
|
|
109
|
+
# @param width [Integer, nil]
|
|
165
110
|
end
|
|
166
111
|
end
|
|
167
112
|
end
|
|
@@ -39,7 +39,7 @@ module Autorender
|
|
|
39
39
|
#
|
|
40
40
|
# @param request_options [Autorender::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
41
41
|
#
|
|
42
|
-
# @return [Autorender::Models::FileListResponse]
|
|
42
|
+
# @return [Autorender::Internal::PagePagination<Autorender::Models::FileListResponse>]
|
|
43
43
|
#
|
|
44
44
|
# @see Autorender::Models::FileListParams
|
|
45
45
|
def list(params = {})
|
|
@@ -49,6 +49,7 @@ module Autorender
|
|
|
49
49
|
method: :get,
|
|
50
50
|
path: "api/v1/files",
|
|
51
51
|
query: query,
|
|
52
|
+
page: Autorender::Internal::PagePagination,
|
|
52
53
|
model: Autorender::Models::FileListResponse,
|
|
53
54
|
options: options
|
|
54
55
|
)
|
data/lib/autorender/version.rb
CHANGED
|
@@ -8,21 +8,41 @@ module Autorender
|
|
|
8
8
|
Elem = type_member
|
|
9
9
|
|
|
10
10
|
sig { returns(T.nilable(T::Array[Elem])) }
|
|
11
|
-
attr_accessor :
|
|
11
|
+
attr_accessor :files
|
|
12
12
|
|
|
13
|
-
sig { returns(
|
|
14
|
-
attr_accessor :
|
|
15
|
-
|
|
16
|
-
sig { returns(T::Boolean) }
|
|
17
|
-
attr_accessor :has_next
|
|
18
|
-
|
|
19
|
-
sig { returns(Integer) }
|
|
20
|
-
attr_accessor :total_results
|
|
13
|
+
sig { returns(Meta) }
|
|
14
|
+
attr_accessor :meta
|
|
21
15
|
|
|
22
16
|
# @api private
|
|
23
17
|
sig { returns(String) }
|
|
24
18
|
def inspect
|
|
25
19
|
end
|
|
20
|
+
|
|
21
|
+
class Meta < Autorender::Internal::Type::BaseModel
|
|
22
|
+
OrHash = T.type_alias { T.any(Meta, Autorender::Internal::AnyHash) }
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
25
|
+
attr_reader :has_next
|
|
26
|
+
|
|
27
|
+
sig { params(has_next: T::Boolean).void }
|
|
28
|
+
attr_writer :has_next
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader :page
|
|
32
|
+
|
|
33
|
+
sig { params(page: Integer).void }
|
|
34
|
+
attr_writer :page
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
params(has_next: T::Boolean, page: Integer).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(has_next: nil, page: nil)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig { override.returns({ has_next: T::Boolean, page: Integer }) }
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
26
46
|
end
|
|
27
47
|
end
|
|
28
48
|
end
|
|
@@ -11,100 +11,102 @@ module Autorender
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
sig { returns(
|
|
15
|
-
attr_accessor :
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :id
|
|
16
16
|
|
|
17
|
-
sig { returns(
|
|
18
|
-
|
|
17
|
+
sig { returns(Time) }
|
|
18
|
+
attr_accessor :created_at
|
|
19
19
|
|
|
20
|
-
sig
|
|
21
|
-
|
|
22
|
-
end
|
|
23
|
-
attr_writer :meta
|
|
24
|
-
|
|
25
|
-
# Files list
|
|
26
|
-
sig do
|
|
27
|
-
params(
|
|
28
|
-
files: T::Array[Autorender::Models::FileListResponse::File::OrHash],
|
|
29
|
-
meta: Autorender::Models::FileListResponse::Meta::OrHash
|
|
30
|
-
).returns(T.attached_class)
|
|
31
|
-
end
|
|
32
|
-
def self.new(files:, meta:)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
sig do
|
|
36
|
-
override.returns(
|
|
37
|
-
{
|
|
38
|
-
files: T::Array[Autorender::Models::FileListResponse::File],
|
|
39
|
-
meta: Autorender::Models::FileListResponse::Meta
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
end
|
|
43
|
-
def to_hash
|
|
44
|
-
end
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :file_no
|
|
45
22
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
T.type_alias do
|
|
49
|
-
T.any(
|
|
50
|
-
Autorender::Models::FileListResponse::File,
|
|
51
|
-
Autorender::Internal::AnyHash
|
|
52
|
-
)
|
|
53
|
-
end
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :folder_name
|
|
54
25
|
|
|
55
|
-
|
|
56
|
-
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_accessor :folder_no
|
|
57
28
|
|
|
58
|
-
|
|
59
|
-
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_accessor :format_
|
|
60
31
|
|
|
61
|
-
|
|
62
|
-
|
|
32
|
+
sig { returns(T.nilable(Integer)) }
|
|
33
|
+
attr_accessor :height
|
|
63
34
|
|
|
64
|
-
|
|
65
|
-
|
|
35
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
36
|
+
attr_accessor :metadata
|
|
66
37
|
|
|
67
|
-
|
|
68
|
-
|
|
38
|
+
sig { returns(String) }
|
|
39
|
+
attr_accessor :mime_type
|
|
69
40
|
|
|
70
|
-
|
|
71
|
-
|
|
41
|
+
sig { returns(String) }
|
|
42
|
+
attr_accessor :name
|
|
72
43
|
|
|
73
|
-
|
|
74
|
-
|
|
44
|
+
sig { returns(String) }
|
|
45
|
+
attr_accessor :path
|
|
75
46
|
|
|
76
|
-
|
|
77
|
-
|
|
47
|
+
sig { returns(Integer) }
|
|
48
|
+
attr_accessor :size
|
|
78
49
|
|
|
79
|
-
|
|
80
|
-
|
|
50
|
+
sig { returns(String) }
|
|
51
|
+
attr_accessor :source
|
|
81
52
|
|
|
82
|
-
|
|
83
|
-
|
|
53
|
+
sig { returns(T::Array[String]) }
|
|
54
|
+
attr_accessor :tags
|
|
84
55
|
|
|
85
|
-
|
|
86
|
-
|
|
56
|
+
sig { returns(T.nilable(Time)) }
|
|
57
|
+
attr_accessor :updated_at
|
|
87
58
|
|
|
88
|
-
|
|
89
|
-
|
|
59
|
+
sig { returns(String) }
|
|
60
|
+
attr_accessor :url
|
|
90
61
|
|
|
91
|
-
|
|
92
|
-
|
|
62
|
+
sig { returns(T.nilable(Integer)) }
|
|
63
|
+
attr_accessor :width
|
|
93
64
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
id: String,
|
|
68
|
+
created_at: Time,
|
|
69
|
+
file_no: String,
|
|
70
|
+
folder_name: T.nilable(String),
|
|
71
|
+
folder_no: T.nilable(String),
|
|
72
|
+
format_: T.nilable(String),
|
|
73
|
+
height: T.nilable(Integer),
|
|
74
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
75
|
+
mime_type: String,
|
|
76
|
+
name: String,
|
|
77
|
+
path: String,
|
|
78
|
+
size: Integer,
|
|
79
|
+
source: String,
|
|
80
|
+
tags: T::Array[String],
|
|
81
|
+
updated_at: T.nilable(Time),
|
|
82
|
+
url: String,
|
|
83
|
+
width: T.nilable(Integer)
|
|
84
|
+
).returns(T.attached_class)
|
|
85
|
+
end
|
|
86
|
+
def self.new(
|
|
87
|
+
id:,
|
|
88
|
+
created_at:,
|
|
89
|
+
file_no:,
|
|
90
|
+
folder_name:,
|
|
91
|
+
folder_no:,
|
|
92
|
+
format_:,
|
|
93
|
+
height:,
|
|
94
|
+
metadata:,
|
|
95
|
+
mime_type:,
|
|
96
|
+
name:,
|
|
97
|
+
path:,
|
|
98
|
+
size:,
|
|
99
|
+
source:,
|
|
100
|
+
tags:,
|
|
101
|
+
updated_at:,
|
|
102
|
+
url:,
|
|
103
|
+
width:
|
|
104
|
+
)
|
|
105
|
+
end
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
sig do
|
|
108
|
+
override.returns(
|
|
109
|
+
{
|
|
108
110
|
id: String,
|
|
109
111
|
created_at: Time,
|
|
110
112
|
file_no: String,
|
|
@@ -122,105 +124,10 @@ module Autorender
|
|
|
122
124
|
updated_at: T.nilable(Time),
|
|
123
125
|
url: String,
|
|
124
126
|
width: T.nilable(Integer)
|
|
125
|
-
|
|
126
|
-
end
|
|
127
|
-
def self.new(
|
|
128
|
-
id:,
|
|
129
|
-
created_at:,
|
|
130
|
-
file_no:,
|
|
131
|
-
folder_name:,
|
|
132
|
-
folder_no:,
|
|
133
|
-
format_:,
|
|
134
|
-
height:,
|
|
135
|
-
metadata:,
|
|
136
|
-
mime_type:,
|
|
137
|
-
name:,
|
|
138
|
-
path:,
|
|
139
|
-
size:,
|
|
140
|
-
source:,
|
|
141
|
-
tags:,
|
|
142
|
-
updated_at:,
|
|
143
|
-
url:,
|
|
144
|
-
width:
|
|
127
|
+
}
|
|
145
128
|
)
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
sig do
|
|
149
|
-
override.returns(
|
|
150
|
-
{
|
|
151
|
-
id: String,
|
|
152
|
-
created_at: Time,
|
|
153
|
-
file_no: String,
|
|
154
|
-
folder_name: T.nilable(String),
|
|
155
|
-
folder_no: T.nilable(String),
|
|
156
|
-
format_: T.nilable(String),
|
|
157
|
-
height: T.nilable(Integer),
|
|
158
|
-
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
159
|
-
mime_type: String,
|
|
160
|
-
name: String,
|
|
161
|
-
path: String,
|
|
162
|
-
size: Integer,
|
|
163
|
-
source: String,
|
|
164
|
-
tags: T::Array[String],
|
|
165
|
-
updated_at: T.nilable(Time),
|
|
166
|
-
url: String,
|
|
167
|
-
width: T.nilable(Integer)
|
|
168
|
-
}
|
|
169
|
-
)
|
|
170
|
-
end
|
|
171
|
-
def to_hash
|
|
172
|
-
end
|
|
173
129
|
end
|
|
174
|
-
|
|
175
|
-
class Meta < Autorender::Internal::Type::BaseModel
|
|
176
|
-
OrHash =
|
|
177
|
-
T.type_alias do
|
|
178
|
-
T.any(
|
|
179
|
-
Autorender::Models::FileListResponse::Meta,
|
|
180
|
-
Autorender::Internal::AnyHash
|
|
181
|
-
)
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
sig { returns(T::Boolean) }
|
|
185
|
-
attr_accessor :has_next
|
|
186
|
-
|
|
187
|
-
sig { returns(T::Boolean) }
|
|
188
|
-
attr_accessor :has_prev
|
|
189
|
-
|
|
190
|
-
sig { returns(Integer) }
|
|
191
|
-
attr_accessor :limit
|
|
192
|
-
|
|
193
|
-
sig { returns(Integer) }
|
|
194
|
-
attr_accessor :page
|
|
195
|
-
|
|
196
|
-
sig { returns(Integer) }
|
|
197
|
-
attr_accessor :total
|
|
198
|
-
|
|
199
|
-
sig do
|
|
200
|
-
params(
|
|
201
|
-
has_next: T::Boolean,
|
|
202
|
-
has_prev: T::Boolean,
|
|
203
|
-
limit: Integer,
|
|
204
|
-
page: Integer,
|
|
205
|
-
total: Integer
|
|
206
|
-
).returns(T.attached_class)
|
|
207
|
-
end
|
|
208
|
-
def self.new(has_next:, has_prev:, limit:, page:, total:)
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
sig do
|
|
212
|
-
override.returns(
|
|
213
|
-
{
|
|
214
|
-
has_next: T::Boolean,
|
|
215
|
-
has_prev: T::Boolean,
|
|
216
|
-
limit: Integer,
|
|
217
|
-
page: Integer,
|
|
218
|
-
total: Integer
|
|
219
|
-
}
|
|
220
|
-
)
|
|
221
|
-
end
|
|
222
|
-
def to_hash
|
|
223
|
-
end
|
|
130
|
+
def to_hash
|
|
224
131
|
end
|
|
225
132
|
end
|
|
226
133
|
end
|
|
@@ -23,7 +23,11 @@ module Autorender
|
|
|
23
23
|
search: String,
|
|
24
24
|
sort: Autorender::FileListParams::Sort::OrSymbol,
|
|
25
25
|
request_options: Autorender::RequestOptions::OrHash
|
|
26
|
-
).returns(
|
|
26
|
+
).returns(
|
|
27
|
+
Autorender::Internal::PagePagination[
|
|
28
|
+
Autorender::Models::FileListResponse
|
|
29
|
+
]
|
|
30
|
+
)
|
|
27
31
|
end
|
|
28
32
|
def list(
|
|
29
33
|
# Filter by folder number
|
|
@@ -3,15 +3,26 @@ module Autorender
|
|
|
3
3
|
class PagePagination[Elem]
|
|
4
4
|
include Autorender::Internal::Type::BasePage[Elem]
|
|
5
5
|
|
|
6
|
-
attr_accessor
|
|
6
|
+
attr_accessor files: ::Array[Elem]?
|
|
7
7
|
|
|
8
|
-
attr_accessor
|
|
8
|
+
attr_accessor meta: Meta
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
def inspect: -> String
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
type meta = { has_next: bool, page: Integer }
|
|
13
|
+
class Meta < Autorender::Internal::Type::BaseModel
|
|
14
|
+
attr_reader has_next: bool?
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
def has_next=: (bool) -> bool
|
|
17
|
+
|
|
18
|
+
attr_reader page: Integer?
|
|
19
|
+
|
|
20
|
+
def page=: (Integer) -> Integer
|
|
21
|
+
|
|
22
|
+
def initialize: (?has_next: bool, ?page: Integer) -> void
|
|
23
|
+
|
|
24
|
+
def to_hash: -> { has_next: bool, page: Integer }
|
|
25
|
+
end
|
|
15
26
|
end
|
|
16
27
|
end
|
|
17
28
|
end
|
|
@@ -2,158 +2,99 @@ module Autorender
|
|
|
2
2
|
module Models
|
|
3
3
|
type file_list_response =
|
|
4
4
|
{
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
id: String,
|
|
6
|
+
created_at: Time,
|
|
7
|
+
file_no: String,
|
|
8
|
+
folder_name: String?,
|
|
9
|
+
folder_no: String?,
|
|
10
|
+
format_: String?,
|
|
11
|
+
height: Integer?,
|
|
12
|
+
metadata: ::Hash[Symbol, top]?,
|
|
13
|
+
mime_type: String,
|
|
14
|
+
name: String,
|
|
15
|
+
path: String,
|
|
16
|
+
size: Integer,
|
|
17
|
+
source: String,
|
|
18
|
+
tags: ::Array[String],
|
|
19
|
+
updated_at: Time?,
|
|
20
|
+
url: String,
|
|
21
|
+
width: Integer?
|
|
7
22
|
}
|
|
8
23
|
|
|
9
24
|
class FileListResponse < Autorender::Internal::Type::BaseModel
|
|
10
|
-
attr_accessor
|
|
25
|
+
attr_accessor id: String
|
|
11
26
|
|
|
12
|
-
attr_accessor
|
|
27
|
+
attr_accessor created_at: Time
|
|
28
|
+
|
|
29
|
+
attr_accessor file_no: String
|
|
30
|
+
|
|
31
|
+
attr_accessor folder_name: String?
|
|
32
|
+
|
|
33
|
+
attr_accessor folder_no: String?
|
|
34
|
+
|
|
35
|
+
attr_accessor format_: String?
|
|
36
|
+
|
|
37
|
+
attr_accessor height: Integer?
|
|
38
|
+
|
|
39
|
+
attr_accessor metadata: ::Hash[Symbol, top]?
|
|
40
|
+
|
|
41
|
+
attr_accessor mime_type: String
|
|
42
|
+
|
|
43
|
+
attr_accessor name: String
|
|
44
|
+
|
|
45
|
+
attr_accessor path: String
|
|
46
|
+
|
|
47
|
+
attr_accessor size: Integer
|
|
48
|
+
|
|
49
|
+
attr_accessor source: String
|
|
50
|
+
|
|
51
|
+
attr_accessor tags: ::Array[String]
|
|
52
|
+
|
|
53
|
+
attr_accessor updated_at: Time?
|
|
54
|
+
|
|
55
|
+
attr_accessor url: String
|
|
56
|
+
|
|
57
|
+
attr_accessor width: Integer?
|
|
13
58
|
|
|
14
59
|
def initialize: (
|
|
15
|
-
|
|
16
|
-
|
|
60
|
+
id: String,
|
|
61
|
+
created_at: Time,
|
|
62
|
+
file_no: String,
|
|
63
|
+
folder_name: String?,
|
|
64
|
+
folder_no: String?,
|
|
65
|
+
format_: String?,
|
|
66
|
+
height: Integer?,
|
|
67
|
+
metadata: ::Hash[Symbol, top]?,
|
|
68
|
+
mime_type: String,
|
|
69
|
+
name: String,
|
|
70
|
+
path: String,
|
|
71
|
+
size: Integer,
|
|
72
|
+
source: String,
|
|
73
|
+
tags: ::Array[String],
|
|
74
|
+
updated_at: Time?,
|
|
75
|
+
url: String,
|
|
76
|
+
width: Integer?
|
|
17
77
|
) -> void
|
|
18
78
|
|
|
19
79
|
def to_hash: -> {
|
|
20
|
-
|
|
21
|
-
|
|
80
|
+
id: String,
|
|
81
|
+
created_at: Time,
|
|
82
|
+
file_no: String,
|
|
83
|
+
folder_name: String?,
|
|
84
|
+
folder_no: String?,
|
|
85
|
+
format_: String?,
|
|
86
|
+
height: Integer?,
|
|
87
|
+
metadata: ::Hash[Symbol, top]?,
|
|
88
|
+
mime_type: String,
|
|
89
|
+
name: String,
|
|
90
|
+
path: String,
|
|
91
|
+
size: Integer,
|
|
92
|
+
source: String,
|
|
93
|
+
tags: ::Array[String],
|
|
94
|
+
updated_at: Time?,
|
|
95
|
+
url: String,
|
|
96
|
+
width: Integer?
|
|
22
97
|
}
|
|
23
|
-
|
|
24
|
-
type file =
|
|
25
|
-
{
|
|
26
|
-
id: String,
|
|
27
|
-
created_at: Time,
|
|
28
|
-
file_no: String,
|
|
29
|
-
folder_name: String?,
|
|
30
|
-
folder_no: String?,
|
|
31
|
-
format_: String?,
|
|
32
|
-
height: Integer?,
|
|
33
|
-
metadata: ::Hash[Symbol, top]?,
|
|
34
|
-
mime_type: String,
|
|
35
|
-
name: String,
|
|
36
|
-
path: String,
|
|
37
|
-
size: Integer,
|
|
38
|
-
source: String,
|
|
39
|
-
tags: ::Array[String],
|
|
40
|
-
updated_at: Time?,
|
|
41
|
-
url: String,
|
|
42
|
-
width: Integer?
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
class File < Autorender::Internal::Type::BaseModel
|
|
46
|
-
attr_accessor id: String
|
|
47
|
-
|
|
48
|
-
attr_accessor created_at: Time
|
|
49
|
-
|
|
50
|
-
attr_accessor file_no: String
|
|
51
|
-
|
|
52
|
-
attr_accessor folder_name: String?
|
|
53
|
-
|
|
54
|
-
attr_accessor folder_no: String?
|
|
55
|
-
|
|
56
|
-
attr_accessor format_: String?
|
|
57
|
-
|
|
58
|
-
attr_accessor height: Integer?
|
|
59
|
-
|
|
60
|
-
attr_accessor metadata: ::Hash[Symbol, top]?
|
|
61
|
-
|
|
62
|
-
attr_accessor mime_type: String
|
|
63
|
-
|
|
64
|
-
attr_accessor name: String
|
|
65
|
-
|
|
66
|
-
attr_accessor path: String
|
|
67
|
-
|
|
68
|
-
attr_accessor size: Integer
|
|
69
|
-
|
|
70
|
-
attr_accessor source: String
|
|
71
|
-
|
|
72
|
-
attr_accessor tags: ::Array[String]
|
|
73
|
-
|
|
74
|
-
attr_accessor updated_at: Time?
|
|
75
|
-
|
|
76
|
-
attr_accessor url: String
|
|
77
|
-
|
|
78
|
-
attr_accessor width: Integer?
|
|
79
|
-
|
|
80
|
-
def initialize: (
|
|
81
|
-
id: String,
|
|
82
|
-
created_at: Time,
|
|
83
|
-
file_no: String,
|
|
84
|
-
folder_name: String?,
|
|
85
|
-
folder_no: String?,
|
|
86
|
-
format_: String?,
|
|
87
|
-
height: Integer?,
|
|
88
|
-
metadata: ::Hash[Symbol, top]?,
|
|
89
|
-
mime_type: String,
|
|
90
|
-
name: String,
|
|
91
|
-
path: String,
|
|
92
|
-
size: Integer,
|
|
93
|
-
source: String,
|
|
94
|
-
tags: ::Array[String],
|
|
95
|
-
updated_at: Time?,
|
|
96
|
-
url: String,
|
|
97
|
-
width: Integer?
|
|
98
|
-
) -> void
|
|
99
|
-
|
|
100
|
-
def to_hash: -> {
|
|
101
|
-
id: String,
|
|
102
|
-
created_at: Time,
|
|
103
|
-
file_no: String,
|
|
104
|
-
folder_name: String?,
|
|
105
|
-
folder_no: String?,
|
|
106
|
-
format_: String?,
|
|
107
|
-
height: Integer?,
|
|
108
|
-
metadata: ::Hash[Symbol, top]?,
|
|
109
|
-
mime_type: String,
|
|
110
|
-
name: String,
|
|
111
|
-
path: String,
|
|
112
|
-
size: Integer,
|
|
113
|
-
source: String,
|
|
114
|
-
tags: ::Array[String],
|
|
115
|
-
updated_at: Time?,
|
|
116
|
-
url: String,
|
|
117
|
-
width: Integer?
|
|
118
|
-
}
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
type meta =
|
|
122
|
-
{
|
|
123
|
-
has_next: bool,
|
|
124
|
-
has_prev: bool,
|
|
125
|
-
limit: Integer,
|
|
126
|
-
page: Integer,
|
|
127
|
-
total: Integer
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
class Meta < Autorender::Internal::Type::BaseModel
|
|
131
|
-
attr_accessor has_next: bool
|
|
132
|
-
|
|
133
|
-
attr_accessor has_prev: bool
|
|
134
|
-
|
|
135
|
-
attr_accessor limit: Integer
|
|
136
|
-
|
|
137
|
-
attr_accessor page: Integer
|
|
138
|
-
|
|
139
|
-
attr_accessor total: Integer
|
|
140
|
-
|
|
141
|
-
def initialize: (
|
|
142
|
-
has_next: bool,
|
|
143
|
-
has_prev: bool,
|
|
144
|
-
limit: Integer,
|
|
145
|
-
page: Integer,
|
|
146
|
-
total: Integer
|
|
147
|
-
) -> void
|
|
148
|
-
|
|
149
|
-
def to_hash: -> {
|
|
150
|
-
has_next: bool,
|
|
151
|
-
has_prev: bool,
|
|
152
|
-
limit: Integer,
|
|
153
|
-
page: Integer,
|
|
154
|
-
total: Integer
|
|
155
|
-
}
|
|
156
|
-
end
|
|
157
98
|
end
|
|
158
99
|
end
|
|
159
100
|
end
|
|
@@ -13,7 +13,7 @@ module Autorender
|
|
|
13
13
|
?search: String,
|
|
14
14
|
?sort: Autorender::Models::FileListParams::sort,
|
|
15
15
|
?request_options: Autorender::request_opts
|
|
16
|
-
) -> Autorender::Models::FileListResponse
|
|
16
|
+
) -> Autorender::Internal::PagePagination[Autorender::Models::FileListResponse]
|
|
17
17
|
|
|
18
18
|
def delete: (
|
|
19
19
|
String file_no,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: autorender
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Autorender
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -199,7 +199,7 @@ homepage: https://gemdocs.org/gems/autorender
|
|
|
199
199
|
licenses: []
|
|
200
200
|
metadata:
|
|
201
201
|
homepage_uri: https://gemdocs.org/gems/autorender
|
|
202
|
-
source_code_uri: https://github.com/
|
|
202
|
+
source_code_uri: https://github.com/autorender/autorender-ruby
|
|
203
203
|
rubygems_mfa_required: 'false'
|
|
204
204
|
post_install_message:
|
|
205
205
|
rdoc_options: []
|