lib/kentaa/api/resources/users.rb in kentaa-api-0.4.0 vs lib/kentaa/api/resources/users.rb in kentaa-api-0.5.0
- old
+ new
@@ -9,14 +9,19 @@
def each(&block)
users.each(&block)
end
def create(attributes = {})
- user = Kentaa::Api::Resources::User.new(config, options)
+ user = Kentaa::Api::Resources::User.new(config, options: options)
user.save(attributes)
end
+ def auth(attributes = {})
+ user = Kentaa::Api::Resources::User.new(config, options: options)
+ user.auth(attributes)
+ end
+
private
def load_resource
request.get("/users", options)
end
@@ -25,10 +30,10 @@
@users ||= begin
users = []
if data
data.each do |user|
- users << Kentaa::Api::Resources::User.new(config, data: user)
+ users << Kentaa::Api::Resources::User.new(config, data: user, options: options)
end
end
users
end