5feet11/5feet11.api

36 lines
523 B
Plaintext

syntax = "v1"
info (
title: "5feet11"
author: "niku"
email: "nvdpoel01@gmail.com"
)
type (
ExpandReq {
ID string `path:"id"`
}
ExpandResp {
RedirectUrl string `json:"redirectUrl"`
}
)
type (
ShortenReq {
RedirectUrl string `json:"redirectUrl"`
ExpiresIn int64 `json:"expiresIn,optional"`
}
ShortenResp {
ID string `json:"id"`
}
)
service fivefeeteleven-api {
@handler ExpandUrl
get /:id(ExpandReq) returns(ExpandResp)
@handler ShortenUrl
post /redirect(ShortenReq) returns(ShortenResp)
}