Skip to content

qxb3/stupid-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stupid api

Just a stupid api

Getting started

Table of contents

Documentation

Check if the number is even

/api/isEven/41

Check if the number is odd

/api/isOdd/24

Check if its a number

/api/isNumber/12

Adds two number

/api/add?firstNum=5&secondNum=10

Subtracts two number

/api/subtract?firstNum=5&secondNum=10

Multiplies two number

/api/multiply?firstNum=5&secondNum=10

Divides two number

/api/divide?firstNum=5&secondNum=10

Output

All of the endpoints follow the similar output

Example url:
/api/add?firstNum=5&secondNum=10

SUCCESS:

{
  "result": 15
}

Example url:
/api/add?firstNum=hi&secondNum=10

ERROR:

{
  "error": "INVALID_QUERY_TYPE",
  "message": "firstNum cannot have any letters or special characters"
}

Installation

git clone https://github.com/qxb3/stupid-apis.git
cd stupid-apis
yarn
npm install #If using npm

Running

Running the project

yarn start
npm run start #If using npm

Running development

yarn dev
npm run dev #If using npm

Contributing

Want to contribute? just make a pr :)

About

Just a stupid api

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors