Class: ForemanApi::Resources::Domain
- Inherits:
-
Base
- Object
- Base
- ForemanApi::Resources::Domain
- Defined in:
- lib/foreman_api/resources/domain.rb
Class Method Summary (collapse)
Instance Method Summary (collapse)
- - (Object) create(params = { }, headers = { })
- - (Object) destroy(params = { }, headers = { })
- - (Object) index(params = { }, headers = { })
- - (Object) show(params = { }, headers = { })
- - (Object) update(params = { }, headers = { })
Class Method Details
+ (Object) doc
4 5 6 |
# File 'lib/foreman_api/resources/domain.rb', line 4 def self.doc @doc ||= ForemanApi.doc['resources']["domains"] end |
Instance Method Details
- (Object) create(params = { }, headers = { })
40 41 42 43 44 |
# File 'lib/foreman_api/resources/domain.rb', line 40 def create(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/domains", params call(:post", url, params, headers) end |
- (Object) destroy(params = { }, headers = { })
66 67 68 69 70 |
# File 'lib/foreman_api/resources/domain.rb', line 66 def destroy(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/domains/:id", params call(:delete", url, params, headers) end |
- (Object) index(params = { }, headers = { })
15 16 17 18 19 |
# File 'lib/foreman_api/resources/domain.rb', line 15 def index(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/domains", params call(:get", url, params, headers) end |
- (Object) show(params = { }, headers = { })
25 26 27 28 29 |
# File 'lib/foreman_api/resources/domain.rb', line 25 def show(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/domains/:id", params call(:get", url, params, headers) end |
- (Object) update(params = { }, headers = { })
56 57 58 59 60 |
# File 'lib/foreman_api/resources/domain.rb', line 56 def update(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/domains/:id", params call(:put", url, params, headers) end |