Skip to content

Instantly share code, notes, and snippets.

@predictioniogists
Created March 18, 2015 04:51
Show Gist options
  • Save predictioniogists/d04c0d7b54c3344768b3 to your computer and use it in GitHub Desktop.
Save predictioniogists/d04c0d7b54c3344768b3 to your computer and use it in GitHub Desktop.
Event collection in Swift
let eventClient = EventClient(accessKey: accessKey, baseURL: "http://localhost:7070")
let event = Event(
event: "view",
entityType: "user",
entityID: "16398de4-cd17-11e4-afdc-1681e6b88ec1",
targetEntityType: "item",
targetEntityID: "2274f58a-cd17-11e4-afdc-1681e6b88ec1"
)
eventClient.createEvent(event) { (request, response, JSON, error) in
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment