Class: Flickr::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/flickr-wrapper/base.rb

Direct Known Subclasses

MachineTag, Photo, PhotoSet, Tag, User

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_id) ⇒ Base

Returns a new instance of Base.



4
5
6
# File 'lib/flickr-wrapper/base.rb', line 4

def initialize(user_id)
  @user_id = user_id
end

Instance Attribute Details

#user_idObject (readonly)

Returns the value of attribute user_id.



2
3
4
# File 'lib/flickr-wrapper/base.rb', line 2

def user_id
  @user_id
end

Instance Method Details

#machine_tagsObject

List all machine tags



27
28
29
# File 'lib/flickr-wrapper/base.rb', line 27

def machine_tags
  Flickr::MachineTag.list(self.user_id)
end

#photosObject

This is a cheat, we’re just going to search with no params. Maximum amount of photos flickr will let me return is 500



17
18
19
# File 'lib/flickr-wrapper/base.rb', line 17

def photos
  Flickr::Photo.list(self.user_id)
end

#setsObject

List all photo sets



11
12
13
# File 'lib/flickr-wrapper/base.rb', line 11

def sets
  Flickr::PhotoSet.list(self.user_id)
end

#tagsObject

List all tags



22
23
24
# File 'lib/flickr-wrapper/base.rb', line 22

def tags
  Flickr::Tag.list(self.user_id)
end