{"action":"created","issue":{"url":"https://api.github.com/repos/CloudBoost/swift-sdk/issues/3","repository_url":"https://api.github.com/repos/CloudBoost/swift-sdk","labels_url":"https://api.github.com/repos/CloudBoost/swift-sdk/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/CloudBoost/swift-sdk/issues/3/comments","events_url":"https://api.github.com/repos/CloudBoost/swift-sdk/issues/3/events","html_url":"https://github.com/CloudBoost/swift-sdk/pull/3","id":156050826,"number":3,"title":"CloudObject subclassing support and embedded framework target","user":{"login":"MicheleLonghi","id":867473,"avatar_url":"https://avatars.githubusercontent.com/u/867473?v=3","gravatar_id":"","url":"https://api.github.com/users/MicheleLonghi","html_url":"https://github.com/MicheleLonghi","followers_url":"https://api.github.com/users/MicheleLonghi/followers","following_url":"https://api.github.com/users/MicheleLonghi/following{/other_user}","gists_url":"https://api.github.com/users/MicheleLonghi/gists{/gist_id}","starred_url":"https://api.github.com/users/MicheleLonghi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicheleLonghi/subscriptions","organizations_url":"https://api.github.com/users/MicheleLonghi/orgs","repos_url":"https://api.github.com/users/MicheleLonghi/repos","events_url":"https://api.github.com/users/MicheleLonghi/events{/privacy}","received_events_url":"https://api.github.com/users/MicheleLonghi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-20T21:05:31Z","updated_at":"2016-05-27T09:12:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CloudBoost/swift-sdk/pulls/3","html_url":"https://github.com/CloudBoost/swift-sdk/pull/3","diff_url":"https://github.com/CloudBoost/swift-sdk/pull/3.diff","patch_url":"https://github.com/CloudBoost/swift-sdk/pull/3.patch"},"body":"### CloudObject subclassing support\r\nThis update allows to obtain objects of a custom subclass  from CloudSearch.search\r\n\r\nExample:\r\n```\r\nclass Invoice: CloudObject {\r\n    var totalAmount: Double {\r\n        get {\r\n            return get(\"totalAmount\") as? Double ?? 0.0\r\n        }\r\n        set {\r\n            return set(\"totalAmount\", newValue)\r\n        }\r\n    }\r\n}\r\n\r\nCloudSearch(tableName: \"Invoice\", objectClass: Invoice.self)\r\n    .search { (response) in\r\n                \r\n        if let invoices = response.object as? [Invoice] {\r\n            let firstInvoice = invoices.first!\r\n            let amount = firstInvoice.totalAmount\r\n        }\r\n    }\r\n``` \r\nIf no objectClass parameter is given, search will behave has usual, returning CloudObject items. \r\n\r\n### Embedded framework target\r\nA new targed cloudboost-embedded has been added. Basically it doesn't contain cocoapods references and can be embedded directly in parent projects. Cocoapods is still present and continues to use the default CloudBoost target."},"comment":{"url":"https://api.github.com/repos/CloudBoost/swift-sdk/issues/comments/222098963","html_url":"https://github.com/CloudBoost/swift-sdk/pull/3#issuecomment-222098963","issue_url":"https://api.github.com/repos/CloudBoost/swift-sdk/issues/3","id":222098963,"user":{"login":"MicheleLonghi","id":867473,"avatar_url":"https://avatars.githubusercontent.com/u/867473?v=3","gravatar_id":"","url":"https://api.github.com/users/MicheleLonghi","html_url":"https://github.com/MicheleLonghi","followers_url":"https://api.github.com/users/MicheleLonghi/followers","following_url":"https://api.github.com/users/MicheleLonghi/following{/other_user}","gists_url":"https://api.github.com/users/MicheleLonghi/gists{/gist_id}","starred_url":"https://api.github.com/users/MicheleLonghi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MicheleLonghi/subscriptions","organizations_url":"https://api.github.com/users/MicheleLonghi/orgs","repos_url":"https://api.github.com/users/MicheleLonghi/repos","events_url":"https://api.github.com/users/MicheleLonghi/events{/privacy}","received_events_url":"https://api.github.com/users/MicheleLonghi/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T09:12:55Z","updated_at":"2016-05-27T09:12:55Z","body":"Starting to comment code in Xcode auto-documentation style"}}
{"actor":{"display_login":"MicheleLonghi"}}