Module: Fog::Scaleway::RequestHelper

Included in:
Account::Real, Compute::Real
Defined in:
lib/fog/scaleway/request_helper.rb

Instance Method Summary collapse

Instance Method Details

#create(path, body) ⇒ Object



4
5
6
7
8
9
# File 'lib/fog/scaleway/request_helper.rb', line 4

def create(path, body)
  request(method: :post,
          path: path,
          body: body,
          expects: [201])
end

#delete(path) ⇒ Object



25
26
27
28
29
# File 'lib/fog/scaleway/request_helper.rb', line 25

def delete(path)
  request(method: :delete,
          path: path,
          expects: [204])
end

#get(path, query = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/fog/scaleway/request_helper.rb', line 11

def get(path, query = {})
  request(method: :get,
          path: path,
          query: query,
          expects: [200])
end

#update(path, body) ⇒ Object



18
19
20
21
22
23
# File 'lib/fog/scaleway/request_helper.rb', line 18

def update(path, body)
  request(method: :put,
          path: path,
          body: body,
          expects: [200])
end