Untitled

API design

  1. define your CRUD, or at least the most important parts

example result

Create URL

createURL(api_dev_key, original_url, custom_alias=None, user_name=None, expiry_date=None)

Parameterstypedescription
api_dev_keystringAPI developer key. e.g. to throttle users based on their quota
original_urlstringthe original URL
custom_aliasstringoptional custom name for URL
user_namestringoptional user name, e.g. for encoding or url path
expiry_datestringoptional expiration date for shortened URL
Returnseventtypedescription
shortened URLsuccessstringthe URL to be shared by users (end result)
error codeerrorError objecterror code and message

Delete URL

deleteURL(api_dev_key, url_key)

Parameterstypedescription
api_dev_keystringApi developer key
url_keystringthe shortened URL to be deleted
Returnseventtypedescription
"Url Removed"successstringmessage indicating success
error codeerrorError objecterror code and message