Merge pull request #553 from dm77/patch-2

Fix urlshortner typo in MIGRATION.md
This commit is contained in:
Steve Bazyl 2017-03-30 11:48:28 -07:00 committed by GitHub
commit 1a191f26f4
1 changed files with 6 additions and 6 deletions

View File

@ -125,15 +125,15 @@ client.execute(batch)
In `0.9`, the equivalent code is: In `0.9`, the equivalent code is:
```ruby ```ruby
require 'google/apis/urlshortner_v1' require 'google/apis/urlshortener_v1'
urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new
urlshortener.batch do |urlshortener| urlshortener.batch do |urlshortener|
urlshortner.insert_url({long_url: 'http://example.com/foo'}) do |res, err| urlshortener.insert_url({long_url: 'http://example.com/foo'}) do |res, err|
puts res puts res
end end
urlshortner.insert_url({long_url: 'http://example.com/bar'}) do |res, err| urlshortener.insert_url({long_url: 'http://example.com/bar'}) do |res, err|
puts res puts res
end end
end end
@ -142,14 +142,14 @@ end
Or if sharing the same block: Or if sharing the same block:
```ruby ```ruby
require 'google/apis/urlshortner_v1' require 'google/apis/urlshortener_v1'
urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new
callback = lambda { |res, err| puts res } callback = lambda { |res, err| puts res }
urlshortener.batch do |urlshortener| urlshortener.batch do |urlshortener|
urlshortner.insert_url({long_url: 'http://example.com/foo'}, &callback) urlshortener.insert_url({long_url: 'http://example.com/foo'}, &callback)
urlshortner.insert_url({long_url: 'http://example.com/bar'}, &callback) urlshortener.insert_url({long_url: 'http://example.com/bar'}, &callback)
end end
``` ```