dustin-r2flickr 0.1.1.6 → 0.1.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/flickr/urls.rb CHANGED
@@ -1,49 +1,50 @@
1
1
  require 'flickr/base'
2
2
 
3
3
  class Flickr::Urls < Flickr::APIBase
4
- def getGroup(group)
5
- group = group.nsid if group.class == Flickr::Group
6
- res = @flickr.call_method('flickr.urls.getGroup',
7
- 'group_id' => group)
8
- return res.elements['/group'].attributes['url']
9
- end
10
4
 
11
- def getUserPhotos(user)
12
- user = user.nsid if user.respond_to?(:nsid)
13
- args = {}
14
- args['user_id'] = user if user
15
- res = @flickr.call_method('flickr.urls.getUserPhotos',args)
16
- return res.elements['/user'].attributes['url']
17
- end
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
18
11
 
19
- def getUserProfile(user)
20
- user = user.nsid if user.respond_to?(:nsid)
21
- args = {}
22
- args['user_id'] = user if user
23
- res = @flickr.call_method('flickr.urls.getUserProfile',args)
24
- return res.elements['/user'].attributes['url']
25
- end
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
26
19
 
27
- def lookupGroup(url)
28
- res = @flickr.call_method('flickr.urls.lookupGroup','url'=>url)
29
- els = res.elements
30
- nsid = els['/group'].attributes['id']
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
31
27
 
32
- g = @flickr.group_cache_lookup(nsid) ||
33
- Flickr::Group.new(@flickr,nsid,
34
- els['/group/groupname'].text)
35
- @flickr.group_cache_store(g)
36
- return g
37
- end
28
+ def lookupGroup(url)
29
+ res = @flickr.call_method('flickr.urls.lookupGroup','url'=>url)
30
+ els = res.elements
31
+ nsid = els['/group'].attributes['id']
38
32
 
39
- def lookupUser(url)
40
- res = @flickr.call_method('flickr.urls.lookupUser','url'=>url)
41
- els = res.elements
42
- nsid = els['/user'].attributes['id']
43
- p = @flickr.person_cache_lookup(nsid) ||
44
- Flickr::Person.new(@flickr,nsid,
45
- els['/user/username'].text)
46
- @flickr.person_cache_store(p)
47
- return p
48
- end
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
49
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dustin-r2flickr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.6
4
+ version: 0.1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marko Anastasov