Class: Streak::User

Inherits:
StreakObject show all
Defined in:
lib/streak/user.rb

Class Method Summary collapse

Methods inherited from StreakObject

attributes, construct_from, convert_to_streak_object, #initialize, #method_missing, relations

Constructor Details

This class inherits a constructor from Streak::StreakObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Streak::StreakObject

Class Method Details

.find(key) ⇒ Object



8
9
10
11
# File 'lib/streak/user.rb', line 8

def self.find(key)
  res = Streak.request(:get, "/users/#{key}")
  convert_to_streak_object(res, User)
end

.meObject



3
4
5
6
# File 'lib/streak/user.rb', line 3

def self.me
  res = Streak.request(:get, "/users/me")
  convert_to_streak_object(res, User)
end