Sutto-SABnzbd 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/SABnzbd.gemspec +2 -2
- data/VERSION.yml +1 -1
- data/lib/sabnzbd.rb +23 -0
- metadata +1 -2
data/SABnzbd.gemspec
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{SABnzbd}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Darcy Laycock"]
|
9
9
|
s.date = %q{2009-01-08}
|
10
10
|
s.description = %q{Ruby interface to the SABnzbd usenet client}
|
11
11
|
s.email = %q{sutto@sutto.net}
|
12
|
-
s.files = ["SABnzbd
|
12
|
+
s.files = ["SABnzbd.gemspec", "VERSION.yml", "example/simple.rb", "lib/sabnzbd.rb", "test/sabnzbd_test.rb", "test/test_helper.rb"]
|
13
13
|
s.homepage = %q{http://github.com/Sutto/SABnzbd}
|
14
14
|
s.require_paths = ["lib"]
|
15
15
|
s.rubygems_version = %q{1.3.1}
|
data/VERSION.yml
CHANGED
data/lib/sabnzbd.rb
CHANGED
@@ -77,6 +77,11 @@ class SABnzbd
|
|
77
77
|
verify api_call(:shutdown)
|
78
78
|
end
|
79
79
|
|
80
|
+
def autoshutdown=(value)
|
81
|
+
options = {:name => (value ? "1" : "0")}
|
82
|
+
verify api_call(:autoshutdown, options)
|
83
|
+
end
|
84
|
+
|
80
85
|
def resume!
|
81
86
|
verify api_call(:resume)
|
82
87
|
end
|
@@ -85,6 +90,24 @@ class SABnzbd
|
|
85
90
|
verify api_call(:pause)
|
86
91
|
end
|
87
92
|
|
93
|
+
def add_url(url, category = nil, job_options = nil, script = nil)
|
94
|
+
options = {}
|
95
|
+
options[:name] = url
|
96
|
+
options[:cat] = category if !category.blank?
|
97
|
+
options[:pp] = job_options if !job_options.blank?
|
98
|
+
options[:script] = script if !script.blank?
|
99
|
+
verify api_call(:addurl, options)
|
100
|
+
end
|
101
|
+
|
102
|
+
def add_newzbin(id, category = nil, job_options = nil, script = nil)
|
103
|
+
options = {}
|
104
|
+
options[:name] = id
|
105
|
+
options[:cat] = category if !category.blank?
|
106
|
+
options[:pp] = job_options if !job_options.blank?
|
107
|
+
options[:script] = script if !script.blank?
|
108
|
+
verify api_call(:addid, options)
|
109
|
+
end
|
110
|
+
|
88
111
|
def api_call(mode, opts = {})
|
89
112
|
opts.merge!(:mode => mode.to_s)
|
90
113
|
return self.class.get("/sabnzbd/api", :query => opts)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Sutto-SABnzbd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darcy Laycock
|
@@ -30,7 +30,6 @@ extensions: []
|
|
30
30
|
extra_rdoc_files: []
|
31
31
|
|
32
32
|
files:
|
33
|
-
- SABnzbd-0.1.0.gem
|
34
33
|
- SABnzbd.gemspec
|
35
34
|
- VERSION.yml
|
36
35
|
- example/simple.rb
|