Class: Flickr::Group
- Inherits:
-
Object
- Object
- Flickr::Group
- Defined in:
- lib/flickr.rb
Overview
Todo: flickr.groups.pools.add flickr.groups.pools.getContext flickr.groups.pools.getGroups flickr.groups.pools.getPhotos flickr.groups.pools.remove
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
, :chatid, :chatcount.
-
#description ⇒ Object
readonly
, :chatid, :chatcount.
-
#eighteenplus ⇒ Object
readonly
, :chatid, :chatcount.
-
#id ⇒ Object
readonly
, :chatid, :chatcount.
-
#members ⇒ Object
readonly
, :chatid, :chatcount.
-
#name ⇒ Object
readonly
, :chatid, :chatcount.
-
#online ⇒ Object
readonly
, :chatid, :chatcount.
-
#privacy ⇒ Object
readonly
, :chatid, :chatcount.
-
#url ⇒ Object
readonly
, :chatid, :chatcount.
Instance Method Summary collapse
-
#getInfo ⇒ Object
Implements flickr.groups.getInfo and flickr.urls.getGroup private, once we can call it as needed.
-
#initialize(id_or_params_hash = nil, api_key = nil) ⇒ Group
constructor
A new instance of Group.
Constructor Details
#initialize(id_or_params_hash = nil, api_key = nil) ⇒ Group
Returns a new instance of Group.
617 618 619 620 621 622 623 624 625 |
# File 'lib/flickr.rb', line 617 def initialize(id_or_params_hash=nil, api_key=nil) if id_or_params_hash.is_a?(Hash) id_or_params_hash.each { |k,v| self.instance_variable_set("@#{k}", v) } # convert extra_params into instance variables else @id = id_or_params_hash @api_key = api_key @client = Flickr.new @api_key end end |
Instance Attribute Details
#client ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def client @client end |
#description ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def description @description end |
#eighteenplus ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def eighteenplus @eighteenplus end |
#id ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def id @id end |
#members ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def members @members end |
#name ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def name @name end |
#online ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def online @online end |
#privacy ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def privacy @privacy end |
#url ⇒ Object (readonly)
, :chatid, :chatcount
615 616 617 |
# File 'lib/flickr.rb', line 615 def url @url end |
Instance Method Details
#getInfo ⇒ Object
Implements flickr.groups.getInfo and flickr.urls.getGroup private, once we can call it as needed
629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/flickr.rb', line 629 def getInfo info = @client.groups_getInfo('group_id'=>@id)['group'] @name = info['name'] @members = info['members'] @online = info['online'] @privacy = info['privacy'] # @chatid = info['chatid'] # @chatcount = info['chatcount'] @url = @client.urls_getGroup('group_id'=>@id)['group']['url'] self end |