Class: ForemanApi::Resources::User
- Inherits:
-
Base
- Object
- Base
- ForemanApi::Resources::User
- Defined in:
- lib/foreman_api/resources/user.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/user.rb', line 4 def self.doc @doc ||= ForemanApi.doc['resources']["users"] end |
Instance Method Details
- (Object) create(params = { }, headers = { })
43 44 45 46 47 |
# File 'lib/foreman_api/resources/user.rb', line 43 def create(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/users", params call(:post", url, params, headers) end |
- (Object) destroy(params = { }, headers = { })
71 72 73 74 75 |
# File 'lib/foreman_api/resources/user.rb', line 71 def destroy(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/users/:id", params call(:delete", url, params, headers) end |
- (Object) index(params = { }, headers = { })
15 16 17 18 19 |
# File 'lib/foreman_api/resources/user.rb', line 15 def index(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/users", params call(:get", url, params, headers) end |
- (Object) show(params = { }, headers = { })
25 26 27 28 29 |
# File 'lib/foreman_api/resources/user.rb', line 25 def show(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/users/:id", params call(:get", url, params, headers) end |
- (Object) update(params = { }, headers = { })
61 62 63 64 65 |
# File 'lib/foreman_api/resources/user.rb', line 61 def update(params = { }, headers = { }) check_params params, :allowed => true, :method => __method__ url, params = fill_params_in_url "/api/users/:id", params call(:put", url, params, headers) end |