runapi-z-image 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: c3ba1f1d12e10c898bf7d5395cee0a63f52d103ffe9ff60d617edd9d91189fab
4
- data.tar.gz: 18fb2a8d3b7f2e5d85b53d60c75828bc824db8a1ac2c24967b9a9dfb8320213d
3
+ metadata.gz: cc0c09f979553f024b669f65fc95a4c471ee3d278a5ddec61d59c4d9fef526e5
4
+ data.tar.gz: e546577764d99fb5fa83b30f657024b4da7e9a1a4d7e6eb7d2f729b2026ff3a9
5
5
  SHA512:
6
- metadata.gz: 6427e15c5cb423df4c65bc6d5162a2eef9192b3f6fc1607837c94dcd88c31659c882015221fae47efe12683acafa698a86ad4fddc45a613388518c57856a39da
7
- data.tar.gz: 016ec72fbf4cb1e7dad8d643178a42040d203e51376d5b11cb1008a4fb07c5cf3f49d7f4c74f3b313777cceaa2cf6bcd36d22c0721085dab5c85c56e093af31d
6
+ metadata.gz: 1170c67cdd1b6c9056181b8b44831d998b54e37cf29060bd0fd936746cfe55dd62d9d72c802e25fbac3ba05c50d6b1c1678d7215ab0bb3a2e5b64c9cede1e149
7
+ data.tar.gz: 15b2ce7ccd0a6756e5a401ea0d2d5ad29a2199ed65d6810cb0d58936d3b04988d1452d713a2a6eca37f04d3bf82e191f2f969ab9b2690b11145c2e8f2de57163
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Z-Image Ruby SDK is the language-specific package for Z-Image on RunAPI. Use this package for image generation, image editing, and creative production workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Ruby.
4
4
 
5
- This README is the Ruby package guide inside the public `z-image-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/z-image; for API reference, use https://runapi.ai/docs#z-image; for SDK docs, use https://runapi.ai/docs#sdk-z-image.
5
+ This README is the Ruby package guide inside the public `z-image-sdk` repository. For the repository overview, start at `../README.md`; for model details, use https://runapi.ai/models/z-image; for API reference, use https://runapi.ai/docs/api/z-image/text-to-image; for SDK docs, use https://runapi.ai/docs/resources/sdks.
6
6
 
7
7
  ## Install
8
8
 
@@ -13,11 +13,11 @@ 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(
20
- # Pass the Z-Image JSON request body from https://runapi.ai/docs#z-image.
20
+ # Pass the Z-Image JSON request body from https://runapi.ai/docs/api/z-image/text-to-image.
21
21
  )
22
22
  status = client.text_to_image.get(task.id)
23
23
  ```
@@ -33,8 +33,8 @@ Use Ruby keyword arguments and the `RunApi::ZImage` error classes when building
33
33
  ## Links
34
34
 
35
35
  - Model page: https://runapi.ai/models/z-image
36
- - SDK docs: https://runapi.ai/docs#sdk-z-image
37
- - Product docs: https://runapi.ai/docs#z-image
36
+ - SDK docs: https://runapi.ai/docs/resources/sdks
37
+ - Product docs: https://runapi.ai/docs/api/z-image/text-to-image
38
38
  - Pricing and rate limits: https://runapi.ai/models/z-image
39
39
  - Provider comparison: https://runapi.ai/providers/alibaba
40
40
  - Full catalog: https://runapi.ai/models
@@ -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.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.4.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.4.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