flickraw 0.8 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +1 -1
- data/lib/flickraw.rb +11 -2
- data/rakefile +1 -0
- data/test/test.rb +4 -1
- metadata +14 -5
data/README.rdoc
CHANGED
@@ -97,7 +97,7 @@ You don't need to do that each time, you can reuse your token:
|
|
97
97
|
|
98
98
|
You can pass some options to modify flickraw behavior:
|
99
99
|
|
100
|
-
|
100
|
+
FlickRawOptions = {
|
101
101
|
"api_key" => "... Your API key ...",
|
102
102
|
"shared_secret" => "... Your shared secret ...",
|
103
103
|
"auth_token" => "... Your saved token..." # if you set this you will be automatically loggued
|
data/lib/flickraw.rb
CHANGED
@@ -33,7 +33,7 @@ if ENV['http_proxy'] and not FlickRawOptions['proxy_host']
|
|
33
33
|
end
|
34
34
|
|
35
35
|
module FlickRaw
|
36
|
-
VERSION='0.8'
|
36
|
+
VERSION='0.8.1'
|
37
37
|
|
38
38
|
FLICKR_HOST='api.flickr.com'.freeze
|
39
39
|
REST_PATH='/services/rest/?'.freeze
|
@@ -288,11 +288,20 @@ module FlickRaw
|
|
288
288
|
def url_b(r); PHOTO_SOURCE_URL % [r.farm, r.server, r.id, r.secret, "_b", "jpg"] end
|
289
289
|
def url_o(r); PHOTO_SOURCE_URL % [r.farm, r.server, r.id, r.originalsecret, "_o", r.originalformat] end
|
290
290
|
def url_profile(r); URL_PROFILE + (r.owner.respond_to?(:nsid) ? r.owner.nsid : r.owner) + "/" end
|
291
|
-
def url_photostream(r); URL_PHOTOSTREAM + (r.owner.respond_to?(:nsid) ? r.owner.nsid : r.owner) + "/" end
|
292
291
|
def url_photopage(r); url_photostream(r) + r.id end
|
293
292
|
def url_photosets(r); url_photostream(r) + "sets/" end
|
294
293
|
def url_photoset(r); url_photosets(r) + r.id end
|
295
294
|
def url_short(r); URL_SHORT + base58(r.id) end
|
295
|
+
def url_photostream(r)
|
296
|
+
URL_PHOTOSTREAM +
|
297
|
+
if r.respond_to?(:pathalias) and r.pathalias
|
298
|
+
r.pathalias
|
299
|
+
elsif r.owner.respond_to?(:nsid)
|
300
|
+
r.owner.nsid
|
301
|
+
else
|
302
|
+
r.owner
|
303
|
+
end + "/"
|
304
|
+
end
|
296
305
|
end
|
297
306
|
end
|
298
307
|
|
data/rakefile
CHANGED
data/test/test.rb
CHANGED
@@ -6,7 +6,7 @@ require 'lib/flickraw'
|
|
6
6
|
class Basic < Test::Unit::TestCase
|
7
7
|
def test_request
|
8
8
|
flickr_objects = %w{activity auth blogs collections commons contacts
|
9
|
-
favorites groups interestingness machinetags panda
|
9
|
+
favorites galleries groups interestingness machinetags panda
|
10
10
|
people photos photosets places prefs reflection tags
|
11
11
|
test urls
|
12
12
|
}
|
@@ -38,6 +38,9 @@ class Basic < Test::Unit::TestCase
|
|
38
38
|
flickr.favorites.getList
|
39
39
|
flickr.favorites.getPublicList
|
40
40
|
flickr.favorites.remove
|
41
|
+
flickr.galleries.addPhoto
|
42
|
+
flickr.galleries.getList
|
43
|
+
flickr.galleries.getListForPhoto
|
41
44
|
flickr.groups.browse
|
42
45
|
flickr.groups.getInfo
|
43
46
|
flickr.groups.members.getList
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flickraw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mael Clerambault
|
@@ -9,10 +9,19 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-11 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: json
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.1.1
|
24
|
+
version:
|
16
25
|
description:
|
17
26
|
email: maelclerambault@yahoo.fr
|
18
27
|
executables: []
|
@@ -31,8 +40,8 @@ files:
|
|
31
40
|
- examples/flickr_KDE.rb
|
32
41
|
- examples/interestingness.rb
|
33
42
|
- examples/upload.rb
|
34
|
-
- test/test_upload.rb
|
35
43
|
- test/test.rb
|
44
|
+
- test/test_upload.rb
|
36
45
|
has_rdoc: true
|
37
46
|
homepage: http://hanklords.github.com/flickraw/
|
38
47
|
licenses: []
|