Class: SakuraCloud
- Inherits:
-
Object
- Object
- SakuraCloud
- Defined in:
- lib/sakura_cloud.rb
Defined Under Namespace
Classes: Server
Constant Summary collapse
- VERSION =
'0.0.1'
- API_URL_BASE =
'https://secure.sakura.ad.jp/cloud/api/cloud/0.2'
Instance Method Summary collapse
-
#initialize(api_key, api_secret) ⇒ SakuraCloud
constructor
A new instance of SakuraCloud.
- #server(server_id) ⇒ Object
Constructor Details
#initialize(api_key, api_secret) ⇒ SakuraCloud
Returns a new instance of SakuraCloud.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/sakura_cloud.rb', line 8 def initialize(api_key, api_secret) @api_key=api_key @api_secret=api_secret api_uri=URI.parse(API_URL_BASE) @api_server=Net::HTTP.new(api_uri.host,api_uri.port) Net::HTTP.version_1_2 if api_uri.scheme=="https" @api_server.use_ssl=true @api_server.verify_mode = OpenSSL::SSL::VERIFY_NONE end end |