Skip to content

API: Users

Darren Hobin edited this page Mar 21, 2017 · 3 revisions

Table of Contents

Add User

Method

POST: https://spore.life/api/users

Parameters

Optional
  • first: String // -- First Name
  • last: String // -- Last Name
  • pass: String // -- Password
  • email: String // -- Email
  • fb: String // -- Facebook ID
  • pic: String // -- Profile Picture URI
  • events: String // -- Event ID List
  • school: String // -- Current School
  • theme: String // -- Theme

Success Response

{"error": 0, "data": user_obj}

Error Response

{"error": 110, "data": mongo_error}

Get User

Method

GET: https://spore.life/api/users

Parameters

Optional
  • user: String // -- User ID
  • fb: String // -- Facebook ID

Success Response

{"error": 0, "data": user_id}

Error Response

{"error": 110, "data": message}

Update User

Method

PUT: https://spore.life/api/users

Parameters

Required
  • user: String // -- User ID
Optional
  • first: String // -- First Name
  • last: String // -- Last Name
  • pass: String // -- Password
  • email: String // -- Email
  • fb: String // -- Facebook ID
  • pic: String // -- Profile Picture URI
  • events: String // -- Event ID List
  • school: String // -- Current School
  • theme: String // -- Theme

Success Response

{"error": 0, "data": user_obj}

Error Response

{"error": 110, "data": mongo_error}

Clone this wiki locally