/flickr-photosphere

Widget that accesses the Flickr API. Displays a list of public photos associated with a given user.

Primary LanguageRuby

Flickr Photosphere

Highlights

  • Utilizes the Flickr API to return a list of public photos upon form submission.

  • Allows viewing of a given Flickr user's public photos

    • Visit the the application page.
    • Enter a Flickr ID, e.g. "adamwoodworth" or "94494572@40N07".
    • Click "View Photos".
    • The Flickraw gem connects to Flickr API.
    • See that user's public photos appear on the same page.

What I learned

  1. How to read and apply an API's documentation

  2. How to setup ENV variables in .bashrc config file, e.g.

      export FLICKRAW_API_KEY="api_key_goes_here"
      export FLICKRAW_SHARED_SECRET="shared_secret_goes_here"
  3. How to setup config vars on Heroku

      heroku config:set FLICKRAW_API_KEY=api_key_goes_here
      heroku config:set FLICKRAW_SHARED_SECRET=shared_secret_goes_here
  4. How to use the capybara-mechanize gem to access external urls within an RSpec system test see spec/system/static_pages_spec.rb

  5. How to setup a custom initializer for the Flickraw gem, e.g.

    # config/initializers.flickraw.rb
      module FlickrPhotosphere
        class Application < Rails::Application
          config.before_initialize do
            FlickRaw.api_key = ENV['FLICKRAW_API_KEY']
            FlickRaw.shared_secret = ENV['FLICKRAW_SHARED_SECRET']
          end
        end
      end