runapi-hailuo 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: 50152f6fb9b5ca8acd27bf0fcd7054b1a72974fa2211362e24a74cf59d871106
4
- data.tar.gz: cee31f624d2d980f71d7e3a6b1bbcca4f6e3c5c33e02605a9432317d2e2a70e8
3
+ metadata.gz: fb3cc81257d50184b03997cde6c80a03f96cf192bdc45c0edd0f5cf501c799ad
4
+ data.tar.gz: 94390dace085ff5dffa274ec4f341feccda94c5f3c704ee9005f329a7cacc37d
5
5
  SHA512:
6
- metadata.gz: 34ca581e88fd2d260db1fe43e0149c90d53c7f33c9fe53e59b58908a2bf7166f98c2e0e6635fa641c7ebd05b22a216d824a9690a921146a3ba9956e8946e0fd9
7
- data.tar.gz: 7f0ba801df266b32043dae6f43d2dfa7180c18807f03037c91ea65a9f49e731c1d718ce17269611e4c906c5c3e944af0507c311279a0e086e126cbb1aa1f7844
6
+ metadata.gz: f30aa83c8275d227fb3c93031ead63ee0e7d505f71cb76be55402a054925faa293a777846d719b131bb55fa687af275866a97b3f2a888aa67a5a0102fa6c19e1
7
+ data.tar.gz: 2ca74e7b3d1f24e5197318a34c3fa96f45435da5a1941679f44a57602fb88a929a35ee20b59b75002e4d2e99b10746303244d114adb3f1465c97d3bca8351b71
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install runapi-hailuo
13
13
  ## Quick start
14
14
 
15
15
  ```ruby
16
- require "runapi-hailuo"
16
+ require "runapi/hailuo"
17
17
 
18
18
  client = RunApi::Hailuo::Client.new
19
19
  task = client.text_to_video.create(
@@ -21,27 +21,27 @@ module RunApi
21
21
  #
22
22
  # @param params [Hash] image-to-video parameters
23
23
  # @return [RunApi::Hailuo::Types::CompletedVideoTaskResponse] completed task with videos
24
- def run(**params)
25
- task = create(**params)
26
- poll_until_complete { get(task.id) }
24
+ def run(options: nil, **params)
25
+ task = create(options: options, **params)
26
+ poll_until_complete { get(task.id, options: options) }
27
27
  end
28
28
 
29
29
  # Create an image-to-video task.
30
30
  #
31
31
  # @param params [Hash] image-to-video parameters
32
32
  # @return [RunApi::Hailuo::Types::VideoTaskResponse] task creation result with id
33
- def create(**params)
33
+ def create(options: nil, **params)
34
34
  params = compact_params(params)
35
35
  validate_params!(params)
36
- request(:post, ENDPOINT, body: params)
36
+ request(:post, ENDPOINT, body: params, options: options)
37
37
  end
38
38
 
39
39
  # Get image-to-video task status by task ID.
40
40
  #
41
41
  # @param id [String] task ID
42
42
  # @return [RunApi::Hailuo::Types::VideoTaskResponse] current task status
43
- def get(id)
44
- request(:get, "#{ENDPOINT}/#{id}")
43
+ def get(id, options: nil)
44
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
45
45
  end
46
46
 
47
47
  private
@@ -21,27 +21,27 @@ module RunApi
21
21
  #
22
22
  # @param params [Hash] text-to-video parameters
23
23
  # @return [RunApi::Hailuo::Types::CompletedVideoTaskResponse] completed task with videos
24
- def run(**params)
25
- task = create(**params)
26
- poll_until_complete { get(task.id) }
24
+ def run(options: nil, **params)
25
+ task = create(options: options, **params)
26
+ poll_until_complete { get(task.id, options: options) }
27
27
  end
28
28
 
29
29
  # Create a text-to-video task.
30
30
  #
31
31
  # @param params [Hash] text-to-video parameters
32
32
  # @return [RunApi::Hailuo::Types::VideoTaskResponse] task creation result with id
33
- def create(**params)
33
+ def create(options: nil, **params)
34
34
  params = compact_params(params)
35
35
  validate_params!(params)
36
- request(:post, ENDPOINT, body: params)
36
+ request(:post, ENDPOINT, body: params, options: options)
37
37
  end
38
38
 
39
39
  # Get text-to-video task status by task ID.
40
40
  #
41
41
  # @param id [String] task ID
42
42
  # @return [RunApi::Hailuo::Types::VideoTaskResponse] current task status
43
- def get(id)
44
- request(:get, "#{ENDPOINT}/#{id}")
43
+ def get(id, options: nil)
44
+ request(:get, "#{ENDPOINT}/#{id}", options: options)
45
45
  end
46
46
 
47
47
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-hailuo
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 Hailuo Ruby SDK is the language-specific package for Hailuo on RunAPI.
27
27
  Use this package for video generation, animation, and video editing workflows when
28
28
  your application needs request bodies, task status lookup, and consistent RunAPI
@@ -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: Hailuo API Ruby SDK for RunAPI
73
73
  test_files: []