flickraw_objects 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df7408e7add3e776767afd2eca89d358acca1dd0
4
- data.tar.gz: 78a0f0d0149323c9b0f08d5911a0a71bfe91d84f
3
+ metadata.gz: f8eecfd471b9fdf534dea1a27fd468a08c0a4098
4
+ data.tar.gz: 0aa14b6fd6d09c3e343fc7e63a6605a50acdefa6
5
5
  SHA512:
6
- metadata.gz: fb5dbad31880564a5b5b01aece7d02a2527efafc5a609466380f9e44e81d9221f554754792c579b70a3c8bfd9cfb4524d0391f12e32ea69e8644aa82fa8899a4
7
- data.tar.gz: 3218518629387806727fd88793a76950dc2d71fda8edf2f84e612317eb92d894096d2c8b7197252d5e42063fd4cef5c47c32af874321f78b6d6ee9c65878caee
6
+ metadata.gz: 91e4523e421e20f9e6d57e30e3fa34f4b28d3636d17ab8d6ce2282985adf682a7fa7d78d8036d85a05a8339075c0cb46c48b59d0a1c53f11d287ba2fae0a0a30
7
+ data.tar.gz: 00ddf17c5b2fe4d43437750500c565304771f097179522fbab0cba32b78da42c6eb51ca3025f745daf0706e34943f67f51c6f86d6aeaab53e9adf5ee9c6da7ca
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # FlickrawObjects
2
2
 
3
- Use this gem as a simple way to map Flickraw results to a object-orientated "data model".
4
- Classes for People and Photos are included: These are there by way of an example. I anticipate
5
- users of this Gem will map the data they need - it's easy to do.
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
- FlickrawObjects.configure do |config|
27
- config.api_key = "Your Api Key"
28
- config.shared_secret = "Shared Secret"
29
- end
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
- person = FlickrawObjects::Person.find_by_username "chrisfield1968"
38
- puts "realname: #{person.realname}" # get_info api call happens automatically
39
-
40
- puts "photos_count #{person.photos_count}" # returns as an Integer
41
- puts "person.first_date_taken #{person.first_date_taken}" # returns as a Date
42
- puts "professional?: #{person.professional?}" # returns as a true/false
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
 
@@ -1,3 +1,3 @@
1
1
  module FlickrawObjects
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,3 @@
1
+ module FlickrawObjects
2
+ VERSION = "0.0.1"
3
+ end
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.1
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