-
20 new API endpoints
Stablereleased this
2026-06-17 06:24:52 +02:00 | 0 commits to master since this release20 new API endpoints:
Math:
POST /api/power,GET /api/power/:a/:b— raises a to the power of b (a^b).POST /api/abs,GET /api/abs/:n— returns the absolute value of a number.POST /api/factorial,GET /api/factorial/:n— calculates n! (0–170).POST /api/isPrime,GET /api/isPrime/:n— checks if a number is prime.
String:
POST /api/repeat— repeats a string n times (max 1000). Body:{ input: { string, times } }.POST /api/trimString,GET /api/trimString/:string— trims leading and trailing whitespace.POST /api/stringContains— checks if a string contains a substring. Body:{ input: { string, search } }.POST /api/randomCase,GET /api/randomCase/:string— randomly capitalizes letters (sPoNgEbOb CaSe).
Array:
POST /api/sum— sums all elements of a numeric array.POST /api/average— calculates the average of all elements in a numeric array.POST /api/arrayMax— returns the largest element in a numeric array.POST /api/arrayMin— returns the smallest element in a numeric array.POST /api/arrayUnique— removes duplicate elements from an array.
Misc:
GET /api/coinFlip— flips a coin, returnsheadsortails.GET /api/diceRoll— rolls a standard 6-sided dice.GET /api/diceRoll/:sides— rolls a dice with a custom number of sides.POST /api/fizzBuzz,GET /api/fizzBuzz/:n— returns Fizz, Buzz, FizzBuzz, or the number itself.
Meme Sorts:
POST /api/intelligentDesignSort— the array was already sorted by a higher power. Returns it untouched.POST /api/quantumSort— collapses the quantum superposition into the only sorted universe. Reports the number of parallel universes destroyed.POST /api/pancakeSort— sorts by repeatedly flipping prefixes. Returns the full flip history.POST /api/gnomeSort— a gnome compares adjacent elements and steps back on each swap. Returns move count.
Changed
- Added
misc/subdirectory for fun/random endpoints. - Updated OpenAPI spec with all new endpoints and a new
Misctag.
Downloads