Web application which utilizes Google Custom Search API
Are you feeling lucky today? Pick a color and let your imagination run wild.
Note that the Google Custom Search API key has a very low call threshold and you might not find yourself lucky. As an alternative, you can setup this app locally (see next section).
cd
to the project’s root directorygem install bundler
bundle install
to install all of the required gemsfeel_lucky_development
and feel_lucky_test
Go to Custom Search API and click on ‘Get a Key’ button under the prerequisites section. Make a note of your API Key as you will need it later.
Go to Custom Search Engine and click on Add to create your own custom search engine. You can select ‘Search the entire web but emphasise included sites’ from the Sites to Search section if you would like to search any Google images. Make a note of your Search engine ID.
In your root directory, create a .env
file and add the following:
API_KEY = YOUR API KEY
CX_ID = YOUR SEARCH ENGINE ID
rspec
to make sure that all tests are passingapp.rb
file and remove the stubbed response on line 29. You can use the stubbed response to avoid hitting the API call limit.rackup
/search
page