Class: Syncano::Resources::User
- Defined in:
- lib/syncano/resources/user.rb
Overview
User resource
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.count(client, scope_parameters = {}, conditions = {}) ⇒ Integer
Wrapper for api “count” method.
-
.login(client, username, password) ⇒ Integer
Wrapper for api “login” method.
Methods inherited from Base
#[], #[]=, all, #batch, batch_create, #batch_destroy, #batch_save, #batch_update, create, #destroy, #destroyed?, find, #initialize, #new_record?, #reload!, #save, #saved?, #update
Constructor Details
This class inherits a constructor from Syncano::Resources::Base
Class Method Details
.count(client, scope_parameters = {}, conditions = {}) ⇒ Integer
Wrapper for api “count” method
10 11 12 13 |
# File 'lib/syncano/resources/user.rb', line 10 def self.count(client, scope_parameters = {}, conditions = {}) response = perform_count(client, scope_parameters, conditions) response.data if response.status end |
.login(client, username, password) ⇒ Integer
Wrapper for api “login” method
20 21 22 23 |
# File 'lib/syncano/resources/user.rb', line 20 def self.login(client, username, password) response = perform_login(client, user_name: username, password: password) response.data end |