Class: Foursquared::Response::BadgeGroup
- Inherits:
-
Object
- Object
- Foursquared::Response::BadgeGroup
- Defined in:
- lib/foursquared/response/badge_group.rb
Overview
Badge group response
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#groups ⇒ Array<Foursquared::Response::BadgeGroup>
Sub groups of the group.
-
#image ⇒ Hash
Image for the badge group.
-
#initialize(client, response) ⇒ BadgeGroup
constructor
A new instance of BadgeGroup.
-
#items ⇒ Array<String>
Array of IDs of badges present in the group.
-
#name ⇒ String
Name of the badge group.
-
#type ⇒ String
The type of badge group.
Constructor Details
#initialize(client, response) ⇒ BadgeGroup
Returns a new instance of BadgeGroup.
6 7 8 9 |
# File 'lib/foursquared/response/badge_group.rb', line 6 def initialize client, response @client = client @response = response end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/foursquared/response/badge_group.rb', line 5 def client @client end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/foursquared/response/badge_group.rb', line 5 def response @response end |
Instance Method Details
#groups ⇒ Array<Foursquared::Response::BadgeGroup>
Sub groups of the group
37 38 39 |
# File 'lib/foursquared/response/badge_group.rb', line 37 def groups response["groups"].map!{|group| Foursquared::Response::BadgeGroup.new(client, group)} end |
#image ⇒ Hash
Image for the badge group
25 26 27 |
# File 'lib/foursquared/response/badge_group.rb', line 25 def image response["image"] end |
#items ⇒ Array<String>
Array of IDs of badges present in the group
31 32 33 |
# File 'lib/foursquared/response/badge_group.rb', line 31 def items response["items"] end |
#name ⇒ String
Name of the badge group
19 20 21 |
# File 'lib/foursquared/response/badge_group.rb', line 19 def name response["name"] end |
#type ⇒ String
The type of badge group
13 14 15 |
# File 'lib/foursquared/response/badge_group.rb', line 13 def type response["type"] end |