class ZeusClient::V1::Auth

Constants

LOCAL_PORT
SUBDOMAIN

Public Instance Methods

get_user(id) click to toggle source
# File lib/zeus/v1/client/auth.rb, line 35
def get_user(id)
    resp = self.class.get("/api/v1/users/#{id}", headers: self.get_headers).parsed_response
    if resp["success"] == true
        return User.new(resp["object"])
    else
        return nil
    end
end
get_users(query) click to toggle source
# File lib/zeus/v1/client/auth.rb, line 25
def get_users(query)
    resp = self.class.get("/api/v1/users", query: query, headers: self.get_headers).parsed_response

    if resp["success"] == true
        return resp["objects"].map {|u| User.new(u) }
    else
        return nil
    end
end
list_users(query) click to toggle source
# File lib/zeus/v1/client/auth.rb, line 12
def list_users(query)
    resp = self.class.get("/api/v1/users", query: query, headers: self.get_headers).parsed_response
    if resp["success"] == true
        return resp["objects"].map {|u| User.new(u) }
    else
        return nil
    end
end
signup_with_email_password(user) click to toggle source
# File lib/zeus/v1/client/auth.rb, line 21
def signup_with_email_password(user)
    resp = self.class.post("/api/v1/users", body: {user: user}.to_json, headers: self.get_headers).parsed_response
end