Class: CloudSpokes::Model::Member

Inherits:
BaseApi
  • Object
show all
Defined in:
app/models/cloud_spokes/model/member.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#active_challengesObject

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

#attributesObject

Returns the value of attribute attributes.



2
3
4
# File 'app/models/cloud_spokes/model/member.rb', line 2

def attributes
  @attributes
end

#challenges_enteredObject

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

#idObject

Returns the value of attribute id.



2
3
4
# File 'app/models/cloud_spokes/model/member.rb', line 2

def id
  @id
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'app/models/cloud_spokes/model/member.rb', line 2

def name
  @name
end

#paymentsObject

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_picObject

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_bioObject

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_zoneObject

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_placeObject

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_placeObject

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_placeObject

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_pointsObject

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_moneyObject

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_winsObject

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_submissionsObject

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_endpointObject



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_paramObject

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