Skip to content
Don Park edited this page Aug 26, 2014 · 21 revisions

User

  • string username
  • string email
  • string name
  • has_many devices

v1

{
    "_id": "2af33a50926ec2e509887b33e6071073",
    "_rev": "6-84e8218b032cf32818d77f45fc5b1205",
    "username": "donpdonp",
    "email": "don.park@gmail.com",
    "password": "$2a$10$DIJn8kaRBpiGogLRyE1IJ.5/UTgo14Og6MjtfSObmYGb3XtCmzhBK",
    "oauth_token": "abc12345",
    "friends": [
        "frontpage",
        "zenlinux"
    ],
    "updated_at": "2014-01-17T18:31:25Z",
    "created_at": "2012-10-18T03:44:26Z",
    "type": "user"
}

v2

{
}

Device

  • string device_id
  • string name
  • string makemodel
  • has_one user

Location

  • has_one device
  • has_one user

v1

{
    "_id": "ffff953d-e71b-479e-8aee-3b7d3b35ff22",
    "_rev": "1-060d409d2f0fc9bd8b2e5aa0856d94ba",
    "position": {
        "accuracy": 19,
        "altitude": 10,
        "longitude": -122.64414168,
        "latitude": 45.51321667
    },
    "username": "donpdonp",
    "ac_power": true,
    "battery_level": 81,
    "velocity": 0,
    "provider": "gps",
    "date": "2014-04-26T04:25:13Z",
    "type": "location",
    "heading": 0
}

Fence

Group

has_many devices

Clone this wiki locally