Class: Mushikago::Mitsubachi::Client
- Inherits:
-
Http::Client
- Object
- Http::Client
- Mushikago::Mitsubachi::Client
- Defined in:
- lib/mushikago/mitsubachi/client.rb
Overview
mitsubachiサービスを利用する
Instance Attribute Summary
Attributes inherited from Http::Client
Instance Method Summary collapse
-
#http_fetch(project_name, url, script_name, options = {}) ⇒ Mushikago::Http::Response
http/fetchを発行します.
-
#http_push(project_name, url, script_name, file_name, file_input_key, options = {}) ⇒ Mushikago::Http::Response
http/pushを発行します.
-
#project_create(project_name, options = {}) ⇒ Mushikago::Http::Response
project/createを発行します.
-
#project_delete(project_name, options = {}) ⇒ Mushikago::Http::Response
project/deleteを発行します.
-
#project_discontinue(project_name, options = {}) ⇒ Mushikago::Http::Response
project/discontinueを発行します.
-
#project_info(project_name, options = {}) ⇒ Mushikago::Http::Response
project/infoを発行します.
-
#project_list(options = {}) ⇒ Mushikago::Http::Response
project/listを発行します.
-
#project_queues(project_name, options = {}) ⇒ Mushikago::Http::Response
project/queuesを発行します.
-
#project_update(project_name, options = {}) ⇒ Mushikago::Http::Response
project/updateを発行します.
- #projects ⇒ Object
-
#resource_delete(project_name, file_name, options = {}) ⇒ Mushikago::Http::Response
resource/deleteを発行します.
-
#resource_get(project_name, file_name, options = {}) ⇒ Mushikago::Http::Response
resource/getを発行します.
-
#resource_list(project_name, options = {}) ⇒ Mushikago::Http::Response
resource/listを発行します.
-
#resource_store(project_name, file_or_file_name, options = {}) ⇒ Mushikago::Http::Response
resource/storeを発行します.
-
#script_delete(project_name, script_name, options = {}) ⇒ Mushikago::Http::Response
script/deleteを発行します.
-
#script_deploy(project_name, file_or_file_name, options = {}) ⇒ Mushikago::Http::Response
script/deployを発行します.
-
#script_get(project_name, script_name, options = {}) ⇒ Mushikago::Http::Response
script/getを発行します.
-
#script_list(project_name, options = {}) ⇒ Mushikago::Http::Response
script/listを発行します.
Methods inherited from Http::Client
Constructor Details
This class inherits a constructor from Mushikago::Http::Client
Instance Method Details
#http_fetch(project_name, url, script_name, options = {}) ⇒ Mushikago::Http::Response
http/fetchを発行します
164 165 166 167 |
# File 'lib/mushikago/mitsubachi/client.rb', line 164 def http_fetch project_name, url, script_name, ={} request = HttpFetchRequest.new(project_name, url, script_name, ) send_request(request) end |
#http_push(project_name, url, script_name, file_name, file_input_key, options = {}) ⇒ Mushikago::Http::Response
http/pushを発行します
190 191 192 193 |
# File 'lib/mushikago/mitsubachi/client.rb', line 190 def http_push project_name, url, script_name, file_name, file_input_key, ={} request = HttpPushRequest.new(project_name, url, script_name, file_name, file_input_key, ) send_request(request) end |
#project_create(project_name, options = {}) ⇒ Mushikago::Http::Response
project/createを発行します
34 35 36 37 |
# File 'lib/mushikago/mitsubachi/client.rb', line 34 def project_create project_name, ={} request = ProjectCreateRequest.new(project_name, ) send_request(request) end |
#project_delete(project_name, options = {}) ⇒ Mushikago::Http::Response
project/deleteを発行します
110 111 112 113 |
# File 'lib/mushikago/mitsubachi/client.rb', line 110 def project_delete project_name, ={} request = ProjectDeleteRequest.new(project_name, ) send_request(request) end |
#project_discontinue(project_name, options = {}) ⇒ Mushikago::Http::Response
project/discontinueを発行します
139 140 141 142 |
# File 'lib/mushikago/mitsubachi/client.rb', line 139 def project_discontinue project_name, ={} request = ProjectDiscontinueRequest.new(project_name, ) send_request(request) end |
#project_info(project_name, options = {}) ⇒ Mushikago::Http::Response
project/infoを発行します
84 85 86 87 |
# File 'lib/mushikago/mitsubachi/client.rb', line 84 def project_info project_name, ={} request = ProjectInfoRequest.new(project_name, ) send_request(request) end |
#project_list(options = {}) ⇒ Mushikago::Http::Response
project/listを発行します
51 52 53 54 |
# File 'lib/mushikago/mitsubachi/client.rb', line 51 def project_list ={} request = ProjectListRequest.new() send_request(request) end |
#project_queues(project_name, options = {}) ⇒ Mushikago::Http::Response
project/queuesを発行します
97 98 99 100 |
# File 'lib/mushikago/mitsubachi/client.rb', line 97 def project_queues project_name, ={} request = ProjectQueuesRequest.new(project_name, ) send_request(request) end |
#project_update(project_name, options = {}) ⇒ Mushikago::Http::Response
project/updateを発行します
127 128 129 130 |
# File 'lib/mushikago/mitsubachi/client.rb', line 127 def project_update project_name, ={} request = ProjectUpdateRequest.new(project_name, ) send_request(request) end |
#projects ⇒ Object
18 19 20 |
# File 'lib/mushikago/mitsubachi/client.rb', line 18 def projects Mitsubachi::Projects.new(self) end |
#resource_delete(project_name, file_name, options = {}) ⇒ Mushikago::Http::Response
resource/deleteを発行します
346 347 348 349 |
# File 'lib/mushikago/mitsubachi/client.rb', line 346 def resource_delete project_name, file_name, ={} request = ResourceDeleteRequest.new(project_name, file_name, ) send_request(request) end |
#resource_get(project_name, file_name, options = {}) ⇒ Mushikago::Http::Response
resource/getを発行します
325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/mushikago/mitsubachi/client.rb', line 325 def resource_get project_name, file_name, ={} request = ResourceGetRequest.new(project_name, file_name, ) result = send_request(request) if [:with_body] begin uri = URI.parse(result['url']) result['body'] = Net::HTTP.get(uri.host, uri.request_uri) rescue end end return result end |
#resource_list(project_name, options = {}) ⇒ Mushikago::Http::Response
resource/listを発行します
310 311 312 313 |
# File 'lib/mushikago/mitsubachi/client.rb', line 310 def resource_list project_name, ={} request = ResourceListRequest.new(project_name, ) send_request(request) end |
#resource_store(project_name, file_or_file_name, options = {}) ⇒ Mushikago::Http::Response
resource/storeを発行します
283 284 285 286 |
# File 'lib/mushikago/mitsubachi/client.rb', line 283 def resource_store project_name, file_or_file_name, ={} request = ResourceStoreRequest.new(project_name, file_or_file_name, ) send_request(request) end |
#script_delete(project_name, script_name, options = {}) ⇒ Mushikago::Http::Response
script/deleteを発行します
267 268 269 270 |
# File 'lib/mushikago/mitsubachi/client.rb', line 267 def script_delete project_name, script_name, ={} request = ScriptDeleteRequest.new(project_name, script_name, ) send_request(request) end |
#script_deploy(project_name, file_or_file_name, options = {}) ⇒ Mushikago::Http::Response
script/deployを発行します
204 205 206 207 |
# File 'lib/mushikago/mitsubachi/client.rb', line 204 def script_deploy project_name, file_or_file_name, ={} request = ScriptDeployRequest.new(project_name, file_or_file_name, ) send_request(request) end |
#script_get(project_name, script_name, options = {}) ⇒ Mushikago::Http::Response
script/getを発行します
246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/mushikago/mitsubachi/client.rb', line 246 def script_get project_name, script_name, ={} request = ScriptGetRequest.new(project_name, script_name, ) result = send_request(request) if [:with_body] begin uri = URI.parse(result['url']) result['body'] = Net::HTTP.get(uri.host, uri.request_uri) rescue end end return result end |
#script_list(project_name, options = {}) ⇒ Mushikago::Http::Response
script/listを発行します
231 232 233 234 |
# File 'lib/mushikago/mitsubachi/client.rb', line 231 def script_list project_name, ={} request = ScriptListRequest.new(project_name, ) send_request(request) end |