flickraw_objects 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -16
- data/lib/flickraw_objects/version.rb +1 -1
- data/lib/flickraw_objects/version.rb~ +3 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8eecfd471b9fdf534dea1a27fd468a08c0a4098
|
4
|
+
data.tar.gz: 0aa14b6fd6d09c3e343fc7e63a6605a50acdefa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91e4523e421e20f9e6d57e30e3fa34f4b28d3636d17ab8d6ce2282985adf682a7fa7d78d8036d85a05a8339075c0cb46c48b59d0a1c53f11d287ba2fae0a0a30
|
7
|
+
data.tar.gz: 00ddf17c5b2fe4d43437750500c565304771f097179522fbab0cba32b78da42c6eb51ca3025f745daf0706e34943f67f51c6f86d6aeaab53e9adf5ee9c6da7ca
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# FlickrawObjects
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
A slim, customisable object-oriented Flickr api that uses flickraw to do all the communication.
|
4
|
+
Use this gem as a simple way to use Flickraw but with an object-orientated "data model".
|
5
|
+
Classes for Person, Photoset and Photos are included. I anticipate
|
6
|
+
users of this Gem will map other data they need. Look at flickraw_objects.rb to see how objects are make
|
7
|
+
Flickraw requests and define the attributes in the response.
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -23,10 +25,11 @@ Or install it yourself as:
|
|
23
25
|
Create an initializer where you set your Flickr credentials.
|
24
26
|
|
25
27
|
```ruby
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
require "flickraw"
|
29
|
+
require "flickraw_objects"
|
30
|
+
|
31
|
+
FlickRaw::api_key = "12345678901234567890123456789012"
|
32
|
+
FlickRaw::shared_secret = "abcdefghijkl"
|
30
33
|
```
|
31
34
|
If you don't have them yet, you can apply for them [here](http://www.flickr.com/services/apps/create/apply).
|
32
35
|
|
@@ -34,15 +37,12 @@ If you don't have them yet, you can apply for them [here](http://www.flickr.com/
|
|
34
37
|
Example usage:
|
35
38
|
|
36
39
|
```ruby
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
puts "
|
43
|
-
|
44
|
-
person.get_photos.each_with_index do |item,i|
|
45
|
-
puts "item #{i}: #{item.title} - #{item.url} - #{item.public?}"
|
40
|
+
me = FlickrawObjects::Person.find_by_username('your-flickr-name')
|
41
|
+
mySets = me.photosets
|
42
|
+
theSet = mySets.find {|y| y.title == "Some Album Title"}
|
43
|
+
thePhotos=theSet.photos
|
44
|
+
thePhotos.each do |pic|
|
45
|
+
puts "#{pic.title} Small: (#{pic.url_small})"
|
46
46
|
end
|
47
47
|
```
|
48
48
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flickraw_objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Field
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- lib/flickraw_objects/attributes.rb
|
68
68
|
- lib/flickraw_objects/attributes.rb~
|
69
69
|
- lib/flickraw_objects/version.rb
|
70
|
+
- lib/flickraw_objects/version.rb~
|
70
71
|
homepage: https://github.com/chrisfield/flickraw_objects
|
71
72
|
licenses:
|
72
73
|
- MIT
|