Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
Removed region tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Natividad committed Nov 29, 2016
1 parent a3b929e commit 06052d6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions 7-compute-engine/app/jobs/lookup_book_details_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START lookup_books]
require "google/apis/books_v1"

BooksAPI = Google::Apis::BooksV1
Expand Down Expand Up @@ -44,8 +43,7 @@ def perform book

# List of relevant books
volumes = results.items
# [END lookup_books]
# [START choose_volume]

# To provide the best results, find the first returned book that
# includes title and author information as well as a book cover image.
best_match = volumes.find {|volume|
Expand All @@ -54,9 +52,7 @@ def perform book
}

volume = best_match || volumes.first
# [END choose_volume]

# [START update_book]
if volume
info = volume.volume_info
images = info.image_links
Expand All @@ -72,10 +68,8 @@ def perform book
present?
book.save
end
# [END update_book]

Rails.logger.info "[BookService] (#{book.id}) Complete"
end
end
end
# [END book_lookup]

0 comments on commit 06052d6

Please sign in to comment.