Skip to content

Commit

Permalink
Fix urlshortner typo in MIGRATION.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dm77 authored Mar 20, 2017
1 parent cf8ca47 commit 85c1892
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ client.execute(batch)
In `0.9`, the equivalent code is:

```ruby
require 'google/apis/urlshortner_v1'
require 'google/apis/urlshortener_v1'

urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new

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
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
end
end
Expand All @@ -142,14 +142,14 @@ end
Or if sharing the same block:

```ruby
require 'google/apis/urlshortner_v1'
require 'google/apis/urlshortener_v1'

urlshortener = Google::Apis::UrlshortenerV1::UrlshortenerService.new

callback = lambda { |res, err| puts res }
urlshortener.batch do |urlshortener|
urlshortner.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/foo'}, &callback)
urlshortener.insert_url({long_url: 'http://example.com/bar'}, &callback)
end
```

Expand Down

0 comments on commit 85c1892

Please sign in to comment.