argonuts-ruby 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -19
- data/lib/argonuts/version.rb +1 -1
- data/lib/argonuts-ruby.rb +1 -1
- data/test/argonuts_test.rb +7 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f8e2a68fc344e060726da5927b02d9cf98f524f1445972648893e224aed869f
|
4
|
+
data.tar.gz: 7ee74e811fc91535f2526a2e7aed4bea495054ebd3acd909defcd11caeedd8f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21589065fa54df1fabf446050acb0cda07696fc90e3f4f2fce81096f74ae95b0dc67437b799c0344a524b6bd58c5a6ab40d03d5af12352e47d6166238b73c902
|
7
|
+
data.tar.gz: 36e10d5e2fc59331b730df88aa874cc61241cb92f8f8627cf11035da9b2cf581f1632c4e6195b5a45d0c3042c6079eb2da0538306223f918d3045382b57b50df
|
data/README.md
CHANGED
@@ -30,14 +30,13 @@ bundle install
|
|
30
30
|
|
31
31
|
## Usage
|
32
32
|
|
33
|
-
The library needs you to set your API key which can be found in your [
|
33
|
+
The library needs you to set your API key which can be found in your [profile](https://argonuts.co/profile).
|
34
34
|
|
35
35
|
|
36
36
|
```ruby
|
37
37
|
Argonuts.api_key = 'api-key'
|
38
38
|
|
39
39
|
Argonuts.notification = {
|
40
|
-
type: "http",
|
41
40
|
url: "https://yoursite.co/api/argonuts/webhook"
|
42
41
|
}
|
43
42
|
|
@@ -49,7 +48,7 @@ Argonuts.storage = {
|
|
49
48
|
## Creating a job
|
50
49
|
|
51
50
|
```ruby
|
52
|
-
Argonuts::Job.create(
|
51
|
+
job = Argonuts::Job.create({
|
53
52
|
input: { url: "https://yoursite.co/path/file.mp4" },
|
54
53
|
outputs: {
|
55
54
|
"jpg:300x": { path: "/image.jpg" },
|
@@ -58,27 +57,13 @@ Argonuts::Job.create(
|
|
58
57
|
hls: { path: "hls/" }
|
59
58
|
}
|
60
59
|
}
|
61
|
-
)
|
60
|
+
})
|
62
61
|
```
|
63
62
|
|
64
63
|
## Getting information about a job
|
65
64
|
|
66
65
|
```ruby
|
67
|
-
Argonuts::Job.retrieve(
|
68
|
-
```
|
69
|
-
|
70
|
-
## Retrieving metadata
|
71
|
-
|
72
|
-
```ruby
|
73
|
-
Argonuts::Metadata.retrieve("OolQXaiU86NFki")
|
74
|
-
|
75
|
-
```
|
76
|
-
|
77
|
-
## Per-request configuration
|
78
|
-
|
79
|
-
```ruby
|
80
|
-
cli = Argonuts::Client.new(api_key: "api-key-prod")
|
81
|
-
Argonuts::Job.create(job, client: cli)
|
66
|
+
Argonuts::Job.retrieve(job.id)
|
82
67
|
```
|
83
68
|
|
84
69
|
*Released under the [MIT license](http://www.opensource.org/licenses/mit-license.php).*
|
data/lib/argonuts/version.rb
CHANGED
data/lib/argonuts-ruby.rb
CHANGED
data/test/argonuts_test.rb
CHANGED
@@ -11,7 +11,6 @@ class ArgonutsTest < Test::Unit::TestCase
|
|
11
11
|
Argonuts.endpoint = ENV["ARGONUTS_ENDPOINT"]
|
12
12
|
|
13
13
|
Argonuts.notification = {
|
14
|
-
type: "http",
|
15
14
|
url: ENV["ARGONUTS_WEBHOOK_URL"]
|
16
15
|
}
|
17
16
|
|
@@ -52,13 +51,13 @@ class ArgonutsTest < Test::Unit::TestCase
|
|
52
51
|
assert_equal "job.starting", job.status
|
53
52
|
end
|
54
53
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
54
|
+
def test_retrieve_job
|
55
|
+
job = Argonuts::Job.retrieve(create_job.id)
|
56
|
+
assert job.is_a?(Argonuts::Job)
|
57
|
+
assert_not_nil job.id
|
58
|
+
assert_equal "job.starting", job.status
|
59
|
+
end
|
60
|
+
|
62
61
|
# def test_create_job_error
|
63
62
|
# create_job(input: {url: "notvalidurl"})
|
64
63
|
# rescue => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: argonuts-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Argonuts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|