Skip to content

Instantly share code, notes, and snippets.

@marsch
Last active August 29, 2015 14:10
Show Gist options
  • Save marsch/5169954f318d6c8c5d41 to your computer and use it in GitHub Desktop.
Save marsch/5169954f318d6c8c5d41 to your computer and use it in GitHub Desktop.
test spec

Get Events

Parameters

  • type (String) Response is filtered by the given type (for instance: notecard, bullet)
  • id (String) Response is filtered by given IDs (comma separated list)
  • since (Timestamp) Response includes only events that occurred after that timestamp

Request

GET /projects/[:projectID]/events?id=[:entityID],[:entityID],type=[:entityType]&since=[:timestampOffset]

Response

Status: 200 Ok
Content-Type:application/json; charset=utf-8

[
  {
    sequence: 1417552817,
    command: 'create:highlight',
    data: {
      color: 'green',
      id: '2424h123'
    }
  },
  {
    sequence: 1417552817,
    command: 'update:highlight', 
    data: {
      color: 'blue',
      id: '2424h123'
    }
  }
]

Store Events

Request

POST /projects/[:projectID]/events

{
  command: 'create:highlight', 
  data: {
    color: 'green',
    id: '2424h123'
  }
}

Response

Status: 201 Created Content-Type:application/json; charset=utf-8

{
  sequence: 1417552817
}
@till
Copy link

till commented Dec 3, 2014

👍

Few additions:

  • last_sequence > since

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment