Methods
# createPaste(text) → {Promise.<(UploadedPaste|Error)>}
Creates a new paste via cancer-co.de domain.
Parameters:
Name | Type | Description |
---|---|---|
text |
String | The text you want to paste. |
- Source:
Returns:
The
UploadedPaste
instance of your paste.
- Type
- Promise.<(UploadedPaste|Error)>
# fetchDomains() → {Promise.<Array.<Domain>>}
Fetches the domain list and returns array of Domain instances.
- Source:
Returns:
Array of Domains.
- Type
- Promise.<Array.<Domain>>
# findDomain(domain) → {Promise.<(Domain|Error)>}
Fetches the domains and finds information about a particular domain.
Parameters:
Name | Type | Description |
---|---|---|
domain |
String | The domain you want to find. |
- Source:
Returns:
Finds the domain and returns class instance of it, returns null if the domain is not found.
- Type
- Promise.<(Domain|Error)>
# shortenLink(url, shortener_url) → {Promise.<(ShortenedLink|Error)>}
Shorten the link.
Parameters:
Name | Type | Description |
---|---|---|
url |
String | The url you want to shorten. |
shortener_url |
String | The shortener url, its not necessarry, defaults to https://questionable.link/shorten |
- Source:
Returns:
Its a promise, will return an instance of the class ShortenedLink on success.
- Type
- Promise.<(ShortenedLink|Error)>