Skip to content

Commit

Permalink
Update Google sample for recent API changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
timburks committed Jun 4, 2018
1 parent 38b66c3 commit 2cc6af7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Examples/Google/NaturalLanguage/Sources/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if let provider = DefaultTokenProvider(scopes: scopes) {

let service = Google_Cloud_Language_V1_LanguageServiceServiceClient(address: "language.googleapis.com")

service.metadata = Metadata(["authorization": "Bearer " + authToken])
service.metadata = try! Metadata(["authorization": "Bearer " + authToken])

var request = Google_Cloud_Language_V1_AnnotateTextRequest()

Expand All @@ -53,7 +53,7 @@ if let provider = DefaultTokenProvider(scopes: scopes) {
print("\(request)")

do {
let result = try service.annotatetext(request)
let result = try service.annotateText(request)
print("\(result)")
} catch {
print("ERROR: \(error)")
Expand Down

0 comments on commit 2cc6af7

Please sign in to comment.