API

The hnng.moe link shortening API is located at

http://www.hnng.moe/shortapi.php

You will have to send a GET request with an url parameter such as:

http://www.hnng.moe/shortapi.php?url=http://www.example.com

 

The hnng.moe file upload API is located at

http://www.hnng.moe/upload_d.php

You will have to send a POST request and the file form value must be named "file".

The response will be formatted in JSON and will contain both the link to the file and the deletion link. If anything goes wrong, status will contain a description of the error.

{
	"url":"http://hnng.moe/f/...",
	"deletelink":"http://www.hnng.moe/deleteupload.php?key=...",
	"status":"OK"
}

 

I made a webm video tutorial that explains how to set up ShareX for hnng.moe → here.

You can get ShareX here.

 

ShareX settings:

{
       "Name": "hnng.moe (url shortener)",
       "RequestType": "GET",
       "RequestURL": "http://www.hnng.moe/shortapi.php",
       "FileFormName": "",
       "Arguments": {
         "url": "$input$"
       },
       "ResponseType": "Text",
       "RegexList": [],
       "URL": "",
       "ThumbnailURL": "",
       "DeletionURL": ""
}
{
       "Name": "hnng.moe (file upload)",
       "RequestType": "POST",
       "RequestURL": "http://www.hnng.moe/upload_d.php",
       "FileFormName": "file",
       "Arguments": {},
       "ResponseType": "Text",
       "RegexList": [
         "\\\"url\\\":\\\"(.+?)\\\"",
         "\\\"deletelink\\\":\\\"(.+?)\\\""
       ],
       "URL": "$1,1$",
       "ThumbnailURL": "",
       "DeletionURL": "$2,1$"
}

 

Tweetbot settings:

Go to Settings → Account Settings → URL Shortening → Custom and enter

http://www.hnng.moe/shortapi.php?url=%@
Created by Franc[e]sco @roriicon