Photo social media database with REST API
user:
-
u_id - (int), Primary ID that preferably auto increments.
-
username - (varchar(32)), Username (Unique Index, Not null).
-
email - (varchar(32)), Username (Unique Index, Not null).
-
full_name - (varchar(32)), Full name of user.
-
password - (varchar(256)), Password of user.
-
profile_pic_path - (varchar(128)), Profile picture (Default 'picture.jpg').
-
access_token - (varchar(256)), Access token for user (Unique Index, Not null).
-
register_date - (DateTime), When did this user sign up?.
photo:
-
p_id - (int), Primary ID that preferably auto increments.
-
u_id - (int), ID of the user who owns this photo (references users(u_id)).
-
caption - (varchar(1024)), Photo caption.
-
pic_path - (varchar(128)), Path to image on server (Unique Index, Not null).
-
creation_date - (DateTime), When was this image created?.
like:
-
l_id - (int), Primary ID that preferably auto increments.
-
u_id - (int), ID of the user performing the like (references users(u_id)).
-
p_id - (int), ID of the photo being liked (references photos(p_id)).
-
p_id - (DateTime), When was this like created?.
-
200
OK
- The request was successful. -
400
Bad Request
- The request could not be understood or was missing required parameters. -
404
Not Found
- Resource was not found. -
503
Service unavailable
- The server is currently unable to handle the request.
localhost/?a=OBJECT&b=ACTION&access_token=ACCSESS_TOKEN
For profile information of a user:
localhost:8080/?a=user&b=read&access_token=ACCSESS_TOKEN
- MIT license
- Copyright 2019 © MahmoudAhmed.