No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-02-21 22:26:10 +04:00
.github/workflows Update executable name in rust.yml for release workflow 2026-02-21 22:26:10 +04:00
src Improve add and bug fix for subtract 2026-02-20 04:30:35 +04:00
.gitignore Let's start! 2026-02-18 03:39:59 +04:00
Cargo.lock Add Cargo.lock 2026-02-21 22:06:45 +04:00
Cargo.toml Refactor query parsing into a separate function and update handlers 2026-02-20 02:56:39 +04:00
LICENSE Add license and metadata to Cargo.toml 2026-02-19 02:40:43 +04:00
README.md Add README.md with API documentation 2026-02-20 03:55:29 +04:00

CalculatorAPI

This project is a simple calculator API built purely for self-education purposes. It provides basic arithmetic operations such as addition, subtraction, multiplication, and division through RESTful API endpoints.

API Endpoints

All endpoints are available under the prefix: /api/v1/

Add

  • GET /api/v1/add?1,2,3
    • Description: Adds all numbers in the comma-separated list.
    • Example: /api/v1/add?1,2,36

Subtract

  • GET /api/v1/subtract?10,2,3
    • Description: Subtracts all subsequent numbers from the first.
    • Example: /api/v1/subtract?10,2,35

Multiply

  • GET /api/v1/multiply?2,3,4
    • Description: Multiplies all numbers in the comma-separated list.
    • Example: /api/v1/multiply?2,3,424

Divide

  • GET /api/v1/divide?100,2,5
    • Description: Divides the first number by each subsequent number in order.
    • Example: /api/v1/divide?100,2,510