caring-r2flickr 0.1.1.7

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.
@@ -0,0 +1,50 @@
1
+ require 'flickr/base'
2
+
3
+ class Flickr::Urls < Flickr::APIBase
4
+
5
+ def getGroup(group)
6
+ group = group.nsid if group.class == Flickr::Group
7
+ res = @flickr.call_method('flickr.urls.getGroup',
8
+ 'group_id' => group)
9
+ return res.elements['/group'].attributes['url']
10
+ end
11
+
12
+ def getUserPhotos(user)
13
+ user = user.nsid if user.respond_to?(:nsid)
14
+ args = {}
15
+ args['user_id'] = user if user
16
+ res = @flickr.call_method('flickr.urls.getUserPhotos',args)
17
+ return res.elements['/user'].attributes['url']
18
+ end
19
+
20
+ def getUserProfile(user)
21
+ user = user.nsid if user.respond_to?(:nsid)
22
+ args = {}
23
+ args['user_id'] = user if user
24
+ res = @flickr.call_method('flickr.urls.getUserProfile',args)
25
+ return res.elements['/user'].attributes['url']
26
+ end
27
+
28
+ def lookupGroup(url)
29
+ res = @flickr.call_method('flickr.urls.lookupGroup','url'=>url)
30
+ els = res.elements
31
+ nsid = els['/group'].attributes['id']
32
+
33
+ g = @flickr.group_cache_lookup(nsid) ||
34
+ Flickr::Group.new(@flickr,nsid,
35
+ els['/group/groupname'].text)
36
+ @flickr.group_cache_store(g)
37
+ return g
38
+ end
39
+
40
+ def lookupUser(url)
41
+ res = @flickr.call_method('flickr.urls.lookupUser','url'=>url)
42
+ els = res.elements
43
+ nsid = els['/user'].attributes['id']
44
+ p = @flickr.person_cache_lookup(nsid) ||
45
+ Flickr::Person.new(@flickr,nsid,
46
+ els['/user/username'].text)
47
+ @flickr.person_cache_store(p)
48
+ return p
49
+ end
50
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: caring-r2flickr
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1.7
5
+ platform: ruby
6
+ authors:
7
+ - Marko Anastasov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-07-31 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: r2flickr is a fork of rflickr, a Ruby implementation of the Flickr API. It includes a faithful reproduction of the published API as well as method encapsulation to provide more useful object mappings. rflickr features result caching to improve performance.
17
+ email: marko.anastasov@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
24
+ files:
25
+ - LICENCE
26
+ - README
27
+ - lib/flickr/auth.rb
28
+ - lib/flickr/base.rb
29
+ - lib/flickr/blogs.rb
30
+ - lib/flickr/contacts.rb
31
+ - lib/flickr/favorites.rb
32
+ - lib/flickr/groups.rb
33
+ - lib/flickr/interestingness.rb
34
+ - lib/flickr/licenses.rb
35
+ - lib/flickr/notes.rb
36
+ - lib/flickr/people.rb
37
+ - lib/flickr/photos.rb
38
+ - lib/flickr/photosets.rb
39
+ - lib/flickr/pools.rb
40
+ - lib/flickr/reflection.rb
41
+ - lib/flickr/tags.rb
42
+ - lib/flickr/test.rb
43
+ - lib/flickr/token_cache.rb
44
+ - lib/flickr/transform.rb
45
+ - lib/flickr/upload.rb
46
+ - lib/flickr/urls.rb
47
+ - lib/flickr/comments.rb
48
+ - lib/flickr.rb
49
+ - examples/album_test.rb
50
+ - examples/comics-reorder.rb
51
+ - examples/loadr.rb
52
+ - examples/relatedness.rb
53
+ - examples/setdumpr.rb
54
+ has_rdoc: false
55
+ homepage: http://github.com/markoa/r2flickr/
56
+ licenses:
57
+ post_install_message:
58
+ rdoc_options: []
59
+
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: "0"
67
+ version:
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: "0"
73
+ version:
74
+ requirements: []
75
+
76
+ rubyforge_project:
77
+ rubygems_version: 1.3.5
78
+ signing_key:
79
+ specification_version: 2
80
+ summary: r2flickr is a ruby interface to the Flickr API
81
+ test_files: []
82
+