{"action":"opened","issue":{"url":"https://api.github.com/repos/cloudant/objective-cloudant/issues/49","repository_url":"https://api.github.com/repos/cloudant/objective-cloudant","labels_url":"https://api.github.com/repos/cloudant/objective-cloudant/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/cloudant/objective-cloudant/issues/49/comments","events_url":"https://api.github.com/repos/cloudant/objective-cloudant/issues/49/events","html_url":"https://github.com/cloudant/objective-cloudant/issues/49","id":159847899,"number":49,"title":"Errors in README.md code for Swift read and delete examples","user":{"login":"gmgershon","id":220053,"avatar_url":"https://avatars.githubusercontent.com/u/220053?v=3","gravatar_id":"","url":"https://api.github.com/users/gmgershon","html_url":"https://github.com/gmgershon","followers_url":"https://api.github.com/users/gmgershon/followers","following_url":"https://api.github.com/users/gmgershon/following{/other_user}","gists_url":"https://api.github.com/users/gmgershon/gists{/gist_id}","starred_url":"https://api.github.com/users/gmgershon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmgershon/subscriptions","organizations_url":"https://api.github.com/users/gmgershon/orgs","repos_url":"https://api.github.com/users/gmgershon/repos","events_url":"https://api.github.com/users/gmgershon/events{/privacy}","received_events_url":"https://api.github.com/users/gmgershon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-12T21:10:48Z","updated_at":"2016-06-12T21:10:48Z","closed_at":null,"body":"//read document\r\ndb.getDocumentWithId(\"doc1\",\r\n    completionHander:(document, operationError) -> Void {\r\n        if let error = operationError {\r\n            println(\"Encountered an error reading a document. Error: \\(error)\")\r\n        } else {\r\n            println(\"Read document \\(document!)\")\r\n        }\r\n})\r\n\r\ncompletionHandler in error: misplaced opening brace and missing \"in\" after Void\r\n\r\nprintln needs to be replaced with print in two places\r\n\r\n----------------\r\n\r\n//delete document\r\ndb.deleteDocumentWithId(\"doc1\",\r\n    revisionId: \"1-revisionidhere\",\r\n    completionHandler: { (statusCode, operationError) -> Void in\r\n        if let error = operationError {\r\n            print(\"Encountered error: \\(error!)\")\r\n        } else {\r\n            print(\"document deleted\")\r\n        }\r\n})\r\n\r\nremove exclamation mark in: print(\"Encountered error: \\(error!)\")"}}
{"actor":{"display_login":"gmgershon"}}