{"id":15152535,"url":"https://github.com/yelp/yelp-rails-example","last_synced_at":"2026-01-11T05:48:04.427Z","repository":{"id":16536643,"uuid":"19290009","full_name":"Yelp/yelp-rails-example","owner":"Yelp","description":"An example Rails application that uses the Yelp gem to integrate with the API","archived":true,"fork":false,"pushed_at":"2014-04-29T20:23:51.000Z","size":208,"stargazers_count":13,"open_issues_count":1,"forks_count":32,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-09-26T16:03:23.700Z","etag":null,"topics":["api","rails-application"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yelp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-29T20:06:34.000Z","updated_at":"2023-01-28T20:49:48.000Z","dependencies_parsed_at":"2022-07-30T19:08:04.719Z","dependency_job_id":null,"html_url":"https://github.com/Yelp/yelp-rails-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yelp%2Fyelp-rails-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yelp%2Fyelp-rails-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yelp%2Fyelp-rails-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yelp%2Fyelp-rails-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yelp","download_url":"https://codeload.github.com/Yelp/yelp-rails-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219874711,"owners_count":16554610,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","rails-application"],"created_at":"2024-09-26T16:03:29.227Z","updated_at":"2025-09-29T23:31:49.942Z","avatar_url":"https://github.com/Yelp.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails + Yelp\n\nThis is a sample Rails application using the Ruby gem. To check it out in action, visit [http://rails-yelp.herokuapp.com/](http://rails-yelp.herokuapp.com/).\n\n## Usage\n\nThe key take away here is that you'll want to place an initializer inside of ``config/initializers`` that set's up the keys for the gem.\n\n```\n# inside of config/initializers/yelp.rb\n\nYelp.client.configure do |config|\n  config.consumer_key = YOUR_CONSUMER_KEY\n  config.consumer_secret = YOUR_CONSUMER_SECRET\n  config.token = YOUR_TOKEN\n  config.token_secret = YOUR_TOKEN_SECRET\nend\n\n```\n\nNow you can use the a pre-initialized client anywhere in the app:\n\n```\n# inside of HomeController\n# app/controllers/home_controller.rb\n\nclass HomeController \u003c ApplicationController\n  # ...\n\n  def search\n    parameters = { term: params[:term], limit: 16 }\n    render json: Yelp.client.search('San Francisco', parameters)\n  end\nend\n\n```\n\nThe client is a singleton so that it's only initialized the first time you call it. The same client is used for every subsequent request made throughout the application.\n\n## Using this example application\n\nThis Rails application was made as an example to show an integration with the Yelp gem/API. For the most part it's ready to go to deploy on Heroku but a few things have been changed.\n\n### API Keys\n\nAPI keys are set and used from environment variables.\n\n#### Yelp\n\nYou'll need to register an account and get API keys from the [developer site](http://www.yelp.com/developers/getting_started/api_access).\n\n#### Google Maps\n\nYou can get a Google Maps key from the [Google Developer Console](https://console.developers.google.com/). Enable the Geocoding API and Google Maps Javascript API v3 to get the map working.\n\n### ``config/database.yml``\n\nThe database file is fairly empty and is set to work with a clean/default PostgreSQL installation. If you're looking to configure it to your system or use a different adapter we recommend looking at the [Ruby on Rails guide to configuring the database](http://edgeguides.rubyonrails.org/configuring.html#configuring-a-database) for more information.\n\n### ``config/secrets.yml``\n\nEvery rails application employs a secret key to verify signed cookies. To keep people from using the same secret keys we've removed them here. You should generate new ones with ``rake secret`` before starting development.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyelp%2Fyelp-rails-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyelp%2Fyelp-rails-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyelp%2Fyelp-rails-example/lists"}