Skip to content

YutaFujii0/miru-rails

Repository files navigation

Rails app generated with lewagon/rails-templates, created by the Le Wagon coding bootcamp team.

for contributers

set the following environment variables

# /.env

CLOUDINARY_URL=cloudinary://12***********89:***************************@********

SEARCH_ENGINE_ID
GOOGLE_CUSTOM_SEARCH_KEY
GOOGLE_CLOUD_PROJECT
GOOGLE_APPLICATION_CREDENTIALS

where to find...

  • cloudinary key: cloudinary console
  • SEARCH_ENGINE_ID: open custom search, select your search engine and see 'Search engine ID'
  • about google custom search, you need several settings => see this
  • GOOGLE_CLOUD_PROJECT: open Google Cloud Platform and select your project, in the dashboard select 'Project Info' -> see 'Project ID'
  • GOOGLE_CUSTOM_SEARCH_KEY: open Google Cloud Platform and select your project, beneath the dashboard select 'Project Info' -> 'credentials' tab -> 'API keys' 'Key'

Google Cloud Vision API

  1. create service account (no coding)
  • IMPORTANT: you'll download a json file when create a service key. Note the path of that json file as you'll use it to set credential.(No need for contributers)
  1. set credential in terminal,
export GOOGLE_CLOUD_PROJECT="[PROJECT NAME]"
export GOOGLE_APPLICATION_CREDENTIALS="[PATH]"
  1. Add gem 'google-cloud-vision' in Gemfile
  2. bundle install
  3. check the methods library and conceive what you can do
  4. create vision instance, then call a .image method
  5. call whatever method you want
    # in this application
    # you can see the project name in your api console
    vision = Google::Cloud::Vision.new project: "PROJECT_ID"
    text  = vision.image(image_path).text
    puts text.text # -> return an array

Google Custom Search API

Google Custom Search

use partial response to improve the performance

About

To visualize a menu so that everyone can eat like the local

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published