Class: CloudSpokes::Model::Member
- Inherits:
-
BaseApi
- Object
- BaseApi
- CloudSpokes::Model::Member
- Defined in:
- app/models/cloud_spokes/model/member.rb
Instance Attribute Summary collapse
-
#active_challenges ⇒ Object
Returns the value of attribute active_challenges.
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#challenges_entered ⇒ Object
Returns the value of attribute challenges_entered.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#payments ⇒ Object
has_many :payments Note that the json does not expose this method TODO (this requires authentication).
-
#profile_pic ⇒ Object
Returns the value of attribute profile_pic.
-
#summary_bio ⇒ Object
Returns the value of attribute summary_bio.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#total_1st_place ⇒ Object
Returns the value of attribute total_1st_place.
-
#total_2nd_place ⇒ Object
Returns the value of attribute total_2nd_place.
-
#total_3st_place ⇒ Object
Returns the value of attribute total_3st_place.
-
#total_points ⇒ Object
Returns the value of attribute total_points.
-
#total_public_money ⇒ Object
Returns the value of attribute total_public_money.
-
#total_wins ⇒ Object
Returns the value of attribute total_wins.
-
#valid_submissions ⇒ Object
Returns the value of attribute valid_submissions.
Class Method Summary collapse
Instance Method Summary collapse
-
#to_param ⇒ Object
Used for resourceful routes (instead of id).
Instance Attribute Details
#active_challenges ⇒ Object
Returns the value of attribute active_challenges.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def active_challenges @active_challenges end |
#attributes ⇒ Object
Returns the value of attribute attributes.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def attributes @attributes end |
#challenges_entered ⇒ Object
Returns the value of attribute challenges_entered.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def challenges_entered @challenges_entered end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def name @name end |
#payments ⇒ Object
has_many :payments Note that the json does not expose this method TODO (this requires authentication)
23 24 25 |
# File 'app/models/cloud_spokes/model/member.rb', line 23 def payments @payments end |
#profile_pic ⇒ Object
Returns the value of attribute profile_pic.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def profile_pic @profile_pic end |
#summary_bio ⇒ Object
Returns the value of attribute summary_bio.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def summary_bio @summary_bio end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def time_zone @time_zone end |
#total_1st_place ⇒ Object
Returns the value of attribute total_1st_place.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def total_1st_place @total_1st_place end |
#total_2nd_place ⇒ Object
Returns the value of attribute total_2nd_place.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def total_2nd_place @total_2nd_place end |
#total_3st_place ⇒ Object
Returns the value of attribute total_3st_place.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def total_3st_place @total_3st_place end |
#total_points ⇒ Object
Returns the value of attribute total_points.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def total_points @total_points end |
#total_public_money ⇒ Object
Returns the value of attribute total_public_money.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def total_public_money @total_public_money end |
#total_wins ⇒ Object
Returns the value of attribute total_wins.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def total_wins @total_wins end |
#valid_submissions ⇒ Object
Returns the value of attribute valid_submissions.
2 3 4 |
# File 'app/models/cloud_spokes/model/member.rb', line 2 def valid_submissions @valid_submissions end |
Class Method Details
.api_endpoint ⇒ Object
11 12 13 |
# File 'app/models/cloud_spokes/model/member.rb', line 11 def self.api_endpoint CloudSpokes::APP_CONFIG[:cs_api][:members] end |
.search(keyword) ⇒ Object
27 28 29 30 |
# File 'app/models/cloud_spokes/model/member.rb', line 27 def self.search(keyword) request(:get, "search", {:keyword => keyword}) .map {|member| CloudSpokes::Model::Member.new member} end |
Instance Method Details
#to_param ⇒ Object
Used for resourceful routes (instead of id)
16 17 18 |
# File 'app/models/cloud_spokes/model/member.rb', line 16 def to_param name end |