runapi-topaz 0.2.7 → 0.2.9

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: 52dc7160d3ead033cba7dcfd96c3e5b8d2155a76c2f2a7a0ff43b5525a4e6f38
4
- data.tar.gz: e2ccac89059ab9e7c30353e2ec249a22957fc15eba0dc25d2818d52d703ebf46
3
+ metadata.gz: 44b1b350809e1a4c68b284874bde0a6c97b6a54f556e954cb9fddfd85c0c69ff
4
+ data.tar.gz: 2190d31fd1f49d6703b09684c5ece244957f836efbe43cdd6f0c5eb2f67b1667
5
5
  SHA512:
6
- metadata.gz: 1de31db31fd7c9740230ad62de53cc32e07211e3914e6e0ec3acd45871f3055c0bcb0fd7423b1ba4364796d5f9a120cd1bd07948a7d6f3ceb34ad1ae35864f21
7
- data.tar.gz: d635d7b485ffe75a77cb1999a4ecbf98310d9f5ae6f745a3035ef1d469b87f5838c9bc0a01d2b4052f12e23787ae4ac0ab4c82443a0a22c03c3aa91ce97344b0
6
+ metadata.gz: a83d5a19c126e61eccc160afa552ef005a01493204992759ac86579192262233ad86b572f3139af11112ef1fe36789745c2742436f383cf074c8fad0661dbc60
7
+ data.tar.gz: b18c0cdbdd7b320f463a805fb7c01d0ac9896ba507feb327f97187256928a849a72f79210bfcdf5db7b8ab7cca21294bf35e2628adc8f31e11199bf84c165993
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install runapi-topaz
13
13
  ## Quick start
14
14
 
15
15
  ```ruby
16
- require "runapi-topaz"
16
+ require "runapi/topaz"
17
17
 
18
18
  client = RunApi::Topaz::Client.new
19
19
  task = client.upscale_image.create(
@@ -7,6 +7,9 @@ module RunApi
7
7
  "models" => ["topaz-upscale-image"],
8
8
  "fields_by_model" => {
9
9
  "topaz-upscale-image" => {
10
+ "model" => {
11
+ "required" => true
12
+ },
10
13
  "source_image_url" => {
11
14
  "required" => true
12
15
  },
@@ -22,6 +25,9 @@ module RunApi
22
25
  "models" => ["topaz-upscale-video"],
23
26
  "fields_by_model" => {
24
27
  "topaz-upscale-video" => {
28
+ "model" => {
29
+ "required" => true
30
+ },
25
31
  "source_video_url" => {
26
32
  "required" => true
27
33
  },
@@ -17,19 +17,19 @@ module RunApi
17
17
  @http = http
18
18
  end
19
19
 
20
- def run(**params)
21
- task = create(**params)
22
- poll_until_complete { get(task.id) }
20
+ def run(options: nil, **params)
21
+ task = create(options: options, **params)
22
+ poll_until_complete { get(task.id, options: options) }
23
23
  end
24
24
 
25
- def create(**params)
25
+ def create(options: nil, **params)
26
26
  params = compact_params(params)
27
27
  validate_contract!(CONTRACT["upscale-image"], params)
28
- request(:post, ENDPOINT, body: params)
28
+ request(:post, ENDPOINT, body: params, options: options)
29
29
  end
30
30
 
31
- def get(id)
32
- request(:get, "#{ENDPOINT}/#{id}")
31
+ def get(id, options: nil)
32
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
33
33
  end
34
34
  end
35
35
  end
@@ -17,19 +17,19 @@ module RunApi
17
17
  @http = http
18
18
  end
19
19
 
20
- def run(**params)
21
- task = create(**params)
22
- poll_until_complete { get(task.id) }
20
+ def run(options: nil, **params)
21
+ task = create(options: options, **params)
22
+ poll_until_complete { get(task.id, options: options) }
23
23
  end
24
24
 
25
- def create(**params)
25
+ def create(options: nil, **params)
26
26
  params = compact_params(params)
27
27
  validate_contract!(CONTRACT["upscale-video"], params)
28
- request(:post, ENDPOINT, body: params)
28
+ request(:post, ENDPOINT, body: params, options: options)
29
29
  end
30
30
 
31
- def get(id)
32
- request(:get, "#{ENDPOINT}/#{id}")
31
+ def get(id, options: nil)
32
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
33
33
  end
34
34
  end
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-topaz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - RunAPI
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.2.7
18
+ version: 0.3.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.2.7
25
+ version: 0.3.0
26
26
  description: The Topaz Ruby SDK is the language-specific package for Topaz on RunAPI.
27
27
  Use this package for image upscale, video upscale, restoration, and production cleanup
28
28
  workflows when your application needs request bodies, task status lookup, and consistent
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 4.0.10
70
+ rubygems_version: 4.0.17
71
71
  specification_version: 4
72
72
  summary: Topaz Ruby SDK for RunAPI
73
73
  test_files: []