Class: Foursquared::Response::BadgeGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/foursquared/response/badge_group.rb

Overview

Badge group response

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject (readonly)

Returns the value of attribute client.



5
6
7
# File 'lib/foursquared/response/badge_group.rb', line 5

def client
  @client
end

#responseObject (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

#groupsArray<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

#imageHash

Image for the badge group

Returns:

  • (Hash)


25
26
27
# File 'lib/foursquared/response/badge_group.rb', line 25

def image
  response["image"]
end

#itemsArray<String>

Array of IDs of badges present in the group

Returns:

  • (Array<String>)


31
32
33
# File 'lib/foursquared/response/badge_group.rb', line 31

def items
  response["items"]
end

#nameString

Name of the badge group

Returns:

  • (String)


19
20
21
# File 'lib/foursquared/response/badge_group.rb', line 19

def name
  response["name"]
end

#typeString

The type of badge group

Returns:

  • (String)


13
14
15
# File 'lib/foursquared/response/badge_group.rb', line 13

def type
  response["type"]
end