User Management 1. Register to System - Request json POST ~/UserManage/ - Parameters json { 'method':'USER_REGISTER', 'data':{ 'email':'[email protected]', 'first_name':'xiao', 'last_name':'yi', 'dob':'1995-07-20', 'password':'xxxxxx', //following info is not necessary 'gender':'m', 'hometown':'china' } } - Response json { 'status':'success', //'status':'fail', 'message':'', //'message':'email already in use', 'data':{ 'user_id':'1', 'email':'[email protected]', 'first_name':'xiao', 'last_name':'yi', 'dob':'1995-07-20' } } 2. Login to System - Request json POST ~/UserManage/ - Parameters json { 'method':'USER_LOGIN', 'data':{ 'email':'[email protected]', 'password':'xxxxxx' } } - Response json { 'status':'success', 'message':'', 'data':{ 'user_id':'1', 'email':'[email protected]', 'first_name':'xiao', 'last_name':'yi', 'dob':'1995-07-20' } } 3. Add a Friend - Request json POST ~/UserManage/ - Parameter json { 'method':'ADD_FRIEND', 'data':{ 'user_id':'1', 'friend_email':'[email protected]' } } - Response json { 'status':'success', 'message':'', 'data':{ //return friend's info 'user_id':'2', 'email':'[email protected]', 'first_name':'gurasees', 'last_name':'chandok', 'dob':'1992-12-15' } } 4. List all Friends - Request json POST ~/UserManage/ - Parameter json { 'method':'GET_FRIEND_LIST', 'data':{ 'user_id':'1' } } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'friend_list':[ { 'user_id':'2', 'email':'[email protected]', 'first_name':'gurasees', 'last_name':'chandok', 'dob':'1992-12-15' }, ] } } 5. Top 10 Most Active Users - Request json POST ~/UserManage/ - Parameter json { 'method':'GET_ACTIVE_USER_LIST', 'data':{} } - Response json { 'status':'success', 'message':'', 'data':{ 'active_user_list':[ { 'user_id':'2', 'email':'[email protected]', 'first_name':'gurasees', 'last_name':'chandok', 'dob':'1992-12-15' }, ] } } Album and Photo Management 1. Create Album - Request json POST ~/AlbumPhoto/ - Parameter json { 'method':'CREATE_ALBUM', 'data':{ 'user_id':'1', 'name':'my_first_album', 'doc':'2017-10-12 00:00:00' } } - Response json { 'status':'success', 'message':'', 'data':{ 'user_id':'1', 'album_id':'1', 'name':'my_first_ablbun', 'doc':'2017-10-12 00:00:00' } } 2. Post Photo - Request json POST ~/AlbumPhoto/ - Parameter json { 'method':'POST_PHOTO', 'data':{ 'user_id':'1' 'photo_data':'http://xxxxxxxxxx', 'caption':'something', 'album_id':'1' } } - Response json { 'status':'success', 'message':'', 'data':{ 'user_id':'1', 'photo_id':'1', 'album_id':'1' } } 3. Browsing Albums - Request json POST ~/AlbumPhoto/ - Parameter json { 'method':'GET_ALBUM_LIST', 'data':{} } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'11', 'album_list':[ { 'album_id':'1', 'name':'my_first_album', 'doc':'2017-10-12 00:00:00', 'user_id':'1' }, ] } } 4. Browsing Photos - Request json POST ~/AlbumPhoto/ - Parameter json { 'method':'GET_PHOTO_LIST', 'data':{ 'album_id':'1' } } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'photo_list':[ { 'album_id':'1', 'photo_id':'1', 'photo_data':'http://xxxxxx' 'caption':'something', 'tag_list':[] }, ] } } Tag Management 1. Add Tags - Request json POST ~/TagManage/ - Parameter json { 'method':'ADD_TAG', 'data':{ 'user_id':'1' 'photo_id':'1', 'tag':'boston' } } - Response json { 'status':'success', 'message':'', 'data':{ 'user_id':'1', 'photo_id':'1', 'tag':'boston' } } 2. View User Photos by Tag Name - Request json POST ~/TagManage/ - Parameter json { 'method':'GET_USER_PHOTOS_BY_TAG', 'data':{ 'user_id':'1', 'tag':'boston' } } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'photo_list':[ { 'photo_id':'1', 'photo_data':'http://xxxxxx' 'caption':'something', 'tag_list':[] }, ] } } 3. View all Photos by Tag Name - Request json POST ~/TagManage/ - Parameter json { 'method':'GET_ALL_PHOTOS_BY_TAG', 'data':{ 'tag':'boston' } } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'photo_list':[ { 'photo_id':'1', 'photo_data':'http://xxxxxx' 'caption':'something', 'tag_list':[] }, ] } } 4. View Most Popular Tags - Request json POST ~/TagManage/ - Parameter json { 'method':'GET_MOST_POPULAT_TAGS', 'data':{} } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'tag_list':['boston',] } } 5. Photo Search - Request json POST ~/TagManage/ - Parameter json { 'method':'GET_PHOTO_LIST_BY_TAGS', 'data':{ 'tag_list':['boston',] } } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'photo_list':[ { 'photo_id':'1', 'photo_data':'http://xxxxxx' 'caption':'something', 'tag_list':[] }, ] } } Comments 1. Post Comment - Request json POST ~/Comments/ - Parameter json { 'method':'POST_COMMENT', 'data':{ 'user_id':'1',//'user_id':'0' means anonymous, 'photo_id':'1', 'text':'it is so great', 'doc':'2017-10-12 00:00:00' } } - Response json { 'status':'success', 'message':'', 'data':{ 'comment_id':'1', 'user_id':'1',//'user_id':'0' means anonymous, 'photo_id':'1', 'text':'it is so great', 'doc':'2017-10-12 00:00:00' } } 2. Like - Request json POST ~/Comments/ - Parameter json { 'method':'LIKE', 'data':{ 'user_id':'1', 'photo_id':'1', 'doc':'2017-10-12 00:00:00' } } - Response json { 'status':'success', 'message':'', 'data':{ 'like_id':'1', 'user_id':'1', 'photo_id':'1', 'doc':'2017-10-12 00:00:00' } } 3. Search Comments - Request json POST ~/Comments/ - Parameter json { 'method':'SEARCH_COMMENTS_BY_TEXT', 'data':{ 'text':'what a great picture' } } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'comment_list':[ { 'comment_id':'1', 'text':'what a great a picture', 'doc':'2017-10-12 00:00:00', 'user_id':'1', 'photo_id':'1' }, ] } } Recommendations 1. Friend Recommendation - Request json POST ~/Recommendations/ - Parameter json { 'method':'FRIEND_RECOMMENDATION', 'data':{ 'user_id':'1' } } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'friend_list':[ { 'user_id':'2', 'email':'[email protected]', 'first_name':'gurasees', 'last_name':'chandok', 'dob':'1992-12-15' }, ] } } 2. Photo Recommendation - Request json POST ~/Recommendations/ - Parameter json { 'method':'PHOTO_RECOMMENDATION', 'data':{ 'user_id':'1' } } - Response json { 'status':'success', 'message':'', 'data':{ 'count':'12', 'photo_list':[ { 'photo_id':'1', 'photo_data':'http://xxxxxx' 'caption':'something', 'tag_list':[] }, ] } }