lib/syncano/query_builder.rb in syncano-3.1.1.beta vs lib/syncano/query_builder.rb in syncano-3.1.1.beta2

- old
+ new

@@ -49,11 +49,11 @@ # Proxy for calling "find" method on the resource object # @param [Integer, String] key # @param [Hash] conditions # @return [Syncano::Resources::Base] - def find(key, conditions = {}) + def find(key = nil, conditions = {}) resource_class.find(client, key, scope_parameters, conditions) end # Proxy for calling "find_by_key" method on the resource object # @param [String] key @@ -133,9 +133,17 @@ # @param [String] new_folder # @param [String] new_state # @return [Syncano::Response] def batch_move(batch_client, ids, conditions = {}, new_folder = nil, new_state = nil) resource_class.batch_move(batch_client, scope_parameters, ids, conditions, new_folder, new_state) + end + + # Proxy for calling "login" method on the resource object + # @param [String] username + # @param [String] password + # @return [Array] collection of Syncano::Resource objects + def login(username = nil, password = nil) + resource_class.login(client, username, password) end private attr_accessor :client, :resource_class, :scope_parameters \ No newline at end of file