ismasan / mini_flickr
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
6924f79
mini_flickr / README.txt
| 00551ff5 » | ismasan | 2008-05-14 | 1 | = mini_flickr | |
| 2 | |||||
| 089564a5 » | ismasan | 2008-05-14 | 3 | * http://github.com/ismasan/mini_flickr/tree/master | |
| 00551ff5 » | ismasan | 2008-05-14 | 4 | ||
| 5 | == DESCRIPTION: | ||||
| 6 | |||||
| 089564a5 » | ismasan | 2008-05-14 | 7 | Simple gem to fetch your Flickr photos through Flickr's REST API | |
| 8 | |||||
| 9 | Get your Flickr API_KEY at http://www.flickr.com/services/api/keys/ | ||||
| 10 | |||||
| 11 | Get your Flickr user id at http://idgettr.com/ | ||||
| 00551ff5 » | ismasan | 2008-05-14 | 12 | ||
| 13 | == FEATURES/PROBLEMS: | ||||
| 14 | |||||
| f47d2fc9 » | ismasan | 2008-05-14 | 15 | * For now it just fetches the latest 30 photos | |
| 16 | |||||
| 17 | * This is not meant to upload photos to Flickr | ||||
| 00551ff5 » | ismasan | 2008-05-14 | 18 | ||
| 19 | == SYNOPSIS: | ||||
| 20 | |||||
| 089564a5 » | ismasan | 2008-05-14 | 21 | class MyFlickr | |
| 22 | include MiniFlickr::Base | ||||
| 23 | connect_to_flickr :api_key => 'your-api-key', :user_id => 'your-user-id' | ||||
| 24 | end | ||||
| 25 | |||||
| 26 | flickr = MyFlickr.new | ||||
| 27 | |||||
| 28 | <% flickr.photos.each do |photo| %> | ||||
| 29 | <a href="<%= photo.medium_url %>"> | ||||
| 30 | <img src="<%= photo.small %>" /> | ||||
| 31 | </a> | ||||
| 32 | <% end %> | ||||
| 33 | |||||
| 6924f792 » | ismasan | 2008-05-15 | 34 | == TESTING: | |
| 35 | |||||
| 36 | This gem uses Rspec for testing. Run the existing specs with rake spec. | ||||
| 37 | |||||
| 38 | You'll need to add your own API key in order for the test suite to work. | ||||
| 39 | |||||
| 40 | Do so by storing it in a file called/api_key.txt | ||||
| 41 | |||||
| 42 | If you contribute, please write specs and make sure they pass. | ||||
| 43 | |||||
| 089564a5 » | ismasan | 2008-05-14 | 44 | === Each photo has: | |
| 45 | |||||
| 46 | ==== Source image urls for sizes | ||||
| 47 | |||||
| 48 | photo.square | ||||
| 49 | |||||
| 50 | photo.thumbnail | ||||
| 51 | |||||
| 52 | photo.small | ||||
| 53 | |||||
| 54 | photo.medium | ||||
| 55 | |||||
| 56 | photo.original | ||||
| 57 | |||||
| 58 | ==== Page urls for sizes | ||||
| 59 | |||||
| 60 | photo.square_url | ||||
| 61 | |||||
| 62 | photo.thumbnail_url | ||||
| 63 | |||||
| 64 | photo.small_url | ||||
| 65 | |||||
| 66 | photo.medium_url | ||||
| 67 | |||||
| 68 | photo.original_url | ||||
| 00551ff5 » | ismasan | 2008-05-14 | 69 | ||
| 70 | == REQUIREMENTS: | ||||
| 71 | |||||
| 089564a5 » | ismasan | 2008-05-14 | 72 | * Hpricot (sudo gem install hpricot) | |
| 00551ff5 » | ismasan | 2008-05-14 | 73 | ||
| 74 | == INSTALL: | ||||
| 75 | |||||
| 089564a5 » | ismasan | 2008-05-14 | 76 | * git clone git://github.com/ismasan/mini_flickr.git | |
| 77 | |||||
| 78 | * cd mini_flickr | ||||
| 79 | |||||
| 80 | * rake install_gem | ||||
| 00551ff5 » | ismasan | 2008-05-14 | 81 | ||
| 82 | == LICENSE: | ||||
| 83 | |||||
| 84 | (The MIT License) | ||||
| 85 | |||||
| f47d2fc9 » | ismasan | 2008-05-14 | 86 | Copyright (c) 2008 Ismael Celis | |
| 00551ff5 » | ismasan | 2008-05-14 | 87 | ||
| 88 | Permission is hereby granted, free of charge, to any person obtaining | ||||
| 89 | a copy of this software and associated documentation files (the | ||||
| 90 | 'Software'), to deal in the Software without restriction, including | ||||
| 91 | without limitation the rights to use, copy, modify, merge, publish, | ||||
| 92 | distribute, sublicense, and/or sell copies of the Software, and to | ||||
| 93 | permit persons to whom the Software is furnished to do so, subject to | ||||
| 94 | the following conditions: | ||||
| 95 | |||||
| 96 | The above copyright notice and this permission notice shall be | ||||
| 97 | included in all copies or substantial portions of the Software. | ||||
| 98 | |||||
| 99 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||||
| 100 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| 101 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||||
| 102 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||||
| 103 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||||
| 104 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||||
| 105 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
