Skip to content

haranku16/RankensteinAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RankensteinAPI

Contributors

Harankumar Nallasivan, Backend Spring Application

Benjamin Yan, Front-End React Native Application

Instructions

Requirements

  1. Maven
  2. MongoDB
  3. Postman

Testing

mvn test

In order to test the API, I recommend the software Postman, which gives you fine-grained control over your HTTP requests.

Running the Server

Make sure the MongoDB daemon is running.

mvn spring-boot:run

APIs

URI Method URL Params/POST Body Examples Requirements
/api/hello GET name (optional)

/api/hello

            {
                "data": "Hello, world!",
                "metadata": {
                    "status": 200,
                    "page": 1,
                    "seed": 1,
                    "size": 1
                }
            }
        

/api/hello?name=Ben

            "data": "Hello, Ben!",
            "metadata": {
                "status": 200,
                "page": 1,
                "seed": 1,
                "size": 1
            }
        
Authenticated
/api/public/register POST
            {
                "username": "String", // at least 5 characters long, starting with an alphabetical character, all alphanumeric
                "password": "String", // at least 8 characters long, a-z, A-Z, 0-9, ~, !, @, #, $, %, ^, &, or *
                "phoneNumber": "String" // valid phone number shape
            }    
        
            {
                "username": "neo123",
                "password": "password",
                "phoneNumber": "+1 555-555-5555"
            }
        
Unauthenticated
/api/public/login POST
            {
                "username": "String", // not empty
                "password": "String", // not empty
            }    
        
            {
                "username": "neo123",
                "password": "password"
            }
        
Unauthenticated
/api/public/logout POST N/A N/A Authenticated
/api/public/confirmation POST username, confirmationCode

/api/public/confirmation?username=neo123&confirmationCode=2018

Unauthenticated
/api/user/set-name POST name

/api/user/set-name?name=Thomas%20Anderson

Authenticated
/api/user/set-nickname POST nickname

/api/user/set-nickname?nickname=Neo

Authenticated

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages