CodeChef Photo Gallery
A photo gallery app made for codechef recruitments 2018
How to Run the Code?
This section describes how the app can be viewed in action.
-
Step 1: Download and setup GoLang
Install GoLang. Official documentation installation is prefect and will work seamlessly. Please be wary to setup the directory structure as specified in the docs.
-
Step 2: Download the App to your local machine
Once golang is installed run the following command
go get github.com/reficul31/codechef-photo-gallery
This would fetch the entire application to the following path $GOPATH/src/github.com/reficul31/codechef-photo-gallery
- Step 3: Running the Server
Once the application is downloaded, run the following commands in sequence to run the server.
go run main.go
Once the application is running, go to the following link.
The dummy account's username and password is
Username: test@test.com
Password: password
API Table
This section describes the API made for and utilized by this app.
Albums
HTTP Verb | CRUD | PARAMS(JSON) | RETURNS(JSON) | ENDPOINT |
---|
GET | Read | | List of Albums | /album |
PUT | Update | Album ID | | /album |
POST | Create | Album Object | | /album |
DELETE | Delete | Album ID | | /album |
Photo
HTTP Verb | CRUD | PARAMS(JSON) | RETURNS(JSON) | ENDPOINT |
---|
GET | Read | | List of Photos | /photo |
PUT | Update | Photo ID | | /photo |
POST | Create | Photo Object | | /photo |
DELETE | Delete | Photo ID | | /photo |
User
HTTP Verb | CRUD | PARAMS(JSON) | RETURNS(JSON) | ENDPOINT |
---|
GET | Read | | User Details | /user |
PUT | Update | User ID | | /user |
POST | Create | User Object | | /register |
DELETE | Delete | User ID | | /user |
TODOS
This section contains all the landmarks that have to be hit in order to complete the challenge successfully
Album
Photo
User
Bonus