Methods
ajax(url, method, body) → {Promise}
Send custom request using fetch api
Parameters:
Name | Type | Description |
---|---|---|
url |
String | |
method |
String | |
body |
Object |
Returns:
- Type
- Promise
cleanSlug(slug) → {String}
Format slug to fetch comments json file
Parameters:
Name | Type | Description |
---|---|---|
slug |
String |
Returns:
- Type
- String
getJsonData(url) → {Promise}
Fetch json data from given url
Parameters:
Name | Type | Description |
---|---|---|
url |
String |
Returns:
- Type
- Promise