Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewjh271/flickr_api
https://github.com/andrewjh271/flickr_api
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/andrewjh271/flickr_api
- Owner: andrewjh271
- Created: 2020-11-17T07:58:28.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-17T23:50:45.000Z (about 4 years ago)
- Last Synced: 2024-12-09T09:54:22.400Z (about 1 month ago)
- Language: Ruby
- Size: 161 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flickr API
Created as part of the Odin Project [curriculum](https://www.theodinproject.com/courses/ruby-on-rails/lessons/using-an-api). View [live page](https://infinite-reef-28711.herokuapp.com/).
### Functionality
Search Flickr by User ID or Tags. If no results are found a suggested search is provided.
### Thoughts
I used the [flickr](https://github.com/cyclotron3k/flickr) gem API kit, as it seemed to be the slightly more recently maintained version of the most popular `FlickRaw`. There is not much documentation for it, and one challenge was figuring out what I could do with the `Flickr::ResponseList` object that was returned after requesting data from the Flickr API. Calling `#methods` on the returned object gave me the most helpful information I could find.
The [figaro](https://github.com/laserlemon/figaro) gem generated a `config/application.yml` file where I could configure `ENV['FLICKR_API_KEY']` and `ENV['FLICKR_SHARED_SECRET']`.
Some useful arguments for `flickr.photos.search` from the Flickr API documentation were `tags`, `tag_mode`, `sort`, `page`, `extras`, and `per_page`. I used `flickr.interestingness.getList` to help generate random search suggestions for either User ID or Tags after an unsuccessful search.