gaptool-api 0.2.4 → 0.3.2
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.
- data/VERSION +1 -1
- data/gaptool-api.gemspec +2 -2
- data/lib/gaptool-api.rb +29 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2
|
1
|
+
0.3.2
|
data/gaptool-api.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "gaptool-api"
|
8
|
-
s.version = "0.2
|
8
|
+
s.version = "0.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Matt Bailey"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-02-06"
|
13
13
|
s.description = "gaptool-server ruby API"
|
14
14
|
s.email = "m@mdb.io"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/gaptool-api.rb
CHANGED
@@ -131,5 +131,34 @@ module GTAPI
|
|
131
131
|
options = { :headers => @auth}
|
132
132
|
JSON::parse self.class.get("/hosts", options)
|
133
133
|
end
|
134
|
+
|
135
|
+
def svcapi_getkey(service)
|
136
|
+
options = { :headers => @auth}
|
137
|
+
JSON::parse self.class.get("/servicekeys/use/#{service}", options)
|
138
|
+
end
|
139
|
+
|
140
|
+
def svcapi_releasekey(service,key)
|
141
|
+
options = {:body => {"key" => key}.to_json , :headers => @auth}
|
142
|
+
JSON::parse self.class.post("/servicekeys/release/#{service}", options)
|
143
|
+
end
|
144
|
+
|
145
|
+
def svcapi_showkeys(service)
|
146
|
+
options = { :headers => @auth}
|
147
|
+
unless service == :all
|
148
|
+
JSON::parse self.class.get("/servicekeys/#{service}", options)
|
149
|
+
else
|
150
|
+
JSON::parse self.class.get("/servicekeys", options)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def svcapi_deletekey(service, key)
|
155
|
+
options = {:body => {"key" => key}.to_json , :headers => @auth}
|
156
|
+
JSON::parse self.class.delete("/servicekeys/#{service}", options)
|
157
|
+
end
|
158
|
+
|
159
|
+
def svcapi_putkey(service, key)
|
160
|
+
options = {:body => {"key" => key}.to_json , :headers => @auth}
|
161
|
+
JSON::parse self.class.put("/servicekeys/#{service}", options)
|
162
|
+
end
|
134
163
|
end
|
135
164
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gaptool-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -141,7 +141,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
segments:
|
143
143
|
- 0
|
144
|
-
hash:
|
144
|
+
hash: -367326954894519449
|
145
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
146
|
none: false
|
147
147
|
requirements:
|