Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Cloud functions on nazroll.com

These are some APIs that I've built for you to use. Usage is free until further notice. These APIs is hosted on Firebase Cloud Functions.

Order Like a Malaysian API

After I made the web app, I asked myself what if I turn it to an API. It could be useful for some stupid bot.

POST /api/orderlikemalaysian

API method:

Parameter Expected values Default
type coffee, tea coffee
size normal, large, small normal
temp hot, ice, less_ice, warm hot
milk yes, no, evaporated yes
sugar yes, no, extra_sweet, less_sweet yes
extra pulled None

Example request:

Accepted request method is in HTTP POST.

curl -X POST 'https://nazroll.com/api/orderlikemalaysian?type=coffee&sugar=yes&size=normal&temp=hot' 

Response body:

Output is formatted in JSON.

    'type': 'coffee',
    'size': 'normal',
    'water_temp': 'hot',
    'sugar': 'yes',
    'string': 'kopi'

If you just want the translated text, just grab the string key/value.