Coder Social home page Coder Social logo

java-employee-challenge's Introduction

Coding Challenge

In this assessment you will be tasked with filling out the functionality of different methods that will be listed further down.

These methods will require some level of api interactions with the following base url: https://dummy.restapiexample.com. Please keep the following in mind when doing this assessment: clean coding practices, test driven development, logging, and scalability. If you are unable to successfully receive responses from the endpoints, mocking the response calls may prove to be helpful.

Endpoints to implement

getAllEmployees()

output - list of employees
description - this should return all employees

getEmployeesByNameSearch()

output - list of employees
description - this should return all employees whose name contains or matches the string input provided

getEmployeeById(string id)

output - employee
description - this should return a single employee

getHighestSalaryOfEmployees()

output - integer of the highest salary
description -  this should return a single integer indicating the highest salary of all employees

getTop10HighestEarningEmployeeNames()

output - list of employees
description -  this should return a list of the top 10 employees based off of their salaries

createEmployee(string name, string salary, string age)

output - string of the status (i.e. success)
description -  this should return a status of success or failed based on if an employee was created

deleteEmployee(String id)

output - the name of the employee that was deleted
description - this should delete the employee with specified id given

External endpoints from base url

This section will outline all available endpoints and their request and response models from https://dummy.restapiexample.com

/employees

request:
    method: GET
    parameters: n/a
    full route: https://dummy.restapiexample.com/api/v1/employees
response:
    {
        "status": "success",
        "data": [
            {
            "id": "1",
            "employee_name": "Tiger Nixon",
            "employee_salary": "320800",
            "employee_age": "61",
            "profile_image": ""
            },
            ....
        ]
    }

/employee/{id}

request:
    method: GET
    parameters: 
        id (String)
    full route: https://dummy.restapiexample.com/api/v1/employee/{id}
response: 
    {
        "status": "success",
        "data": {
            "id": "1",
            "employee_name": "Foo Bar",
            "employee_salary": "320800",
            "employee_age": "61",
            "profile_image": ""
        }
    }

/create

request:
    method: POST
    parameters: 
        name (String),
        salary (String),
        age (String)
    full route: https://dummy.restapiexample.com/api/v1/create
response:
    {
        "status": "success",
        "data": {
            "name": "test",
            "salary": "123",
            "age": "23",
            "id": 25
        }
    }

/delete/{id}

request:
    method: DELETE
    parameters:
        id (String)
    full route: https://dummy.restapiexample.com/api/v1/delete/{id}
response:
    {
        "status": "success",
        "message": "successfully! deleted Record"
    }

java-employee-challenge's People

Contributors

aishwaryagupta97 avatar jkls avatar

Watchers

Vishesh Gupta avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.