runapi-z-image 0.2.7 → 0.2.8

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: c3ba1f1d12e10c898bf7d5395cee0a63f52d103ffe9ff60d617edd9d91189fab
4
- data.tar.gz: 18fb2a8d3b7f2e5d85b53d60c75828bc824db8a1ac2c24967b9a9dfb8320213d
3
+ metadata.gz: 58ef3ee01eda999e989ff9f6d08380ae01344598622fbc8b8b7772d703b8dfcb
4
+ data.tar.gz: 824abb45e84e3b97378cae64d29dd0c4b98d8c5cb98edc1705586927e6d44a9a
5
5
  SHA512:
6
- metadata.gz: 6427e15c5cb423df4c65bc6d5162a2eef9192b3f6fc1607837c94dcd88c31659c882015221fae47efe12683acafa698a86ad4fddc45a613388518c57856a39da
7
- data.tar.gz: 016ec72fbf4cb1e7dad8d643178a42040d203e51376d5b11cb1008a4fb07c5cf3f49d7f4c74f3b313777cceaa2cf6bcd36d22c0721085dab5c85c56e093af31d
6
+ metadata.gz: d9d5f299612e31c1464d3a8118802e0983c6a7a31b6dfae1e885f958f50ae2fa8b71ebbc568d684e34b8f80111f4795f300d98fc3fb88a0c1e7b1a75cd7ba22a
7
+ data.tar.gz: 6561e4c58d7834da030a271a42be3bed8721a43cfb3a0a532d5fbbdaec8a59fd4dff453f24358061bb72f6ca6dae93d24466cf0b940e325798c481390e899167
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install runapi-z-image
13
13
  ## Quick start
14
14
 
15
15
  ```ruby
16
- require "runapi-z-image"
16
+ require "runapi/z_image"
17
17
 
18
18
  client = RunApi::ZImage::Client.new
19
19
  task = client.text_to_image.create(
@@ -16,19 +16,19 @@ module RunApi
16
16
  @http = http
17
17
  end
18
18
 
19
- def run(**params)
20
- task = create(**params)
21
- poll_until_complete { get(task.id) }
19
+ def run(options: nil, **params)
20
+ task = create(options: options, **params)
21
+ poll_until_complete { get(task.id, options: options) }
22
22
  end
23
23
 
24
- def create(**params)
24
+ def create(options: nil, **params)
25
25
  params = compact_params(params)
26
26
  validate_contract!(CONTRACT["text-to-image"], params)
27
- request(:post, ENDPOINT, body: params)
27
+ request(:post, ENDPOINT, body: params, options: options)
28
28
  end
29
29
 
30
- def get(id)
31
- request(:get, "#{ENDPOINT}/#{id}")
30
+ def get(id, options: nil)
31
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
32
32
  end
33
33
  end
34
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-z-image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
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 Z-Image Ruby SDK is the language-specific package for Z-Image on
27
27
  RunAPI. Use this package for image generation, image editing, and creative production
28
28
  workflows when your application needs request bodies, task status lookup, and consistent
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 4.0.10
69
+ rubygems_version: 4.0.17
70
70
  specification_version: 4
71
71
  summary: Z-Image Ruby SDK for RunAPI
72
72
  test_files: []