We have left all of our previous patches available to view in other branches but the LemonCode_Final.zip folder in the Master branch contains ALL THE LATEST WEBSITE CODE. If that is your only interesting, then you'll find everything you need there.
Attempts to register a new user with a username, first name, last name, and password. If successful, returns their user id for use in other API calls.
{ "username":<username>, "password":<password>, "firstName":<first name>, "lastName":<last name> }
<username> - string to use as username
<password> - string to use as password
<first name> - string representing the user's first name
<last name> - string representing the user's last name
{ "error":"" }
{ "error":<error> }
<error> - string containing error information
Attempts to login with a given username and password. If successful, returns the first/last name of the user and their user id for use in other API calls.
{ "username":<username>, "password":<password> }
<username> - string to use as username
<password> - string to use as password
{ "userid":<user id>, "firstName":<first name>, "lastName":<last name>, "error":"" }
<user id> - integer representing the user's unique id
<first name> - string representing the user's first name
<last name> - string representing the user's last name
{ "userid":0, "firstName":"", "lastName":"", "error":"No Records Found" }
Attempts to add a contact to the database for a given user.
{ "userid":<user id>, "firstName":<first name>, "lastName":<last name>, "email":<email>, "phoneNumber":<phone number> }
<user id> - integer representing the user's unique id
<first name> - string (max length 20) representing the contact's first name
<last name> - string (max length 20) representing the contact's last name
<email> - string (max length 320) representing the contacts email address (email#domain.com)
<phone number> - string (max length 12. 2 for country code, 3 for area code, 7 for phone number. Does not include hyphens) representing the contact's phone number
{ "error":"" }
{ "error":<error> }
<error> - string containing error information
Attempts to delete a contact from the database for a given user.
{ "userid":<user id>, "contactid":<contact id> }
<user id> - integer representing the user's unique id
<contact id> - integer representing the contact's unique id
{ "error":"" }
{ "error":<error> }
<error> - string containing error information
Searches for contacts based on a given search term and returns the results.
{ "userid":<user id>, "search":<search term> }
<user id> - id of user to search contacts of
<search term> - string to search for
{ "results":[<contact id 1>, <contact id 2>, ..., <contact id x>], "error":"" }
{ "results":[<first name 1>, <first name 2>, ..., <first name x>], "error":"" }
{ "results":[<last name 1>, <last name 2>, ..., <last name x>], "error":"" }
{ "results":[<email 1>, <email 2>, ..., <email x>], "error":"" }
{ "results":[<phone number 1>, <phone number 2>, ..., <phone number x>], "error":"" }
<contact id i> - integer representing the contact's unique id
<first name i> - string representing contact's first name
<last name i> - string representing contact's last name
<email i> - string representing contact's email
<phone number i> - string representing contact's phone number
{ "userid":0, "firstName":"", "lastName":"", "error":<error> }
<error> - string with error information
Updates contact information for a given contact for a given user.
{ "userid":<user id>, "firstName":<first name>, "lastName":<last name>, "email":<email>, "phoneNumber":<phone number>, "contactid":<contact id> }
<user id> - integer representing the user's unique id
<first name> - string (max length 20) representing the contact's first name
<last name> - string (max length 20) representing the contact's last name
<email> - string (max length 320) representing the contacts email address (email#domain.com)
<phone number> - string (max length 15; 2 for country code, 3 for area code, 7 for phone number, and 3 for hyphens) representing the contact's phone number
<contact id> - integer representing the contact's unique id
{ "error":"" }
{ "error":<error> }
<error> - string containing error information