forked from thewebfellas/flickr_fu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
70 lines (46 loc) · 1.57 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
= flickr-fu
== Contact
Author: Ben Wyrosdick
Email: ben.wyrosdick [at] gmail.com
Google Group: http://groups.google.com/group/flickr-fu
Main Repository: http://github.com/bwyrosdick/flickr-fu/tree/master
== Getting Started
You need to first get an API key as detailed here:
http://www.flickr.com/services/api/misc.api_keys.html
== Documentation
RDoc Documentation can be found here:
http://www.commonthread.com/projects/flickr-fu/rdoc/
== Authorization Example
require 'flickr_fu'
flickr = Flickr.new('flickr.yml')
puts "visit the following url, then click <enter> once you have authorized:"
# request write permissions
puts flickr.auth.url(:write)
gets
flickr.auth.cache_token
== Search Example
require 'flickr_fu'
flickr = Flickr.new('flickr.yml')
photos = flickr.photos.search(:tags => 'ruby-flickr')
puts "found #{photos.size} photo(s)"
photos.each do |photo|
puts photo.title
puts photo.description unless [nil, ''].include?(photo.description)
[:square, :thumbnail, :small, :medium, :large, :original].each do |size|
puts "#{size}: #{photo.url(size)}"
end
puts "comments: #{photo.comments.size}"
photo.comments.each do |comment|
intro = "#{comment.author_name} says - "
puts "#{intro}\"#{comment.comment.gsub("\n", "\n"+(" "*intro.length))}\""
end
puts "notes: #{photo.notes.size}"
photo.notes.each do |note|
puts "[#{note.x},#{note.y} ~ #{note.width}x#{note.height}] - \"#{note.note}\""
end
puts
puts
end
== Patch Contributers
Chris Ledet
Maciej Biłas