Last active
April 29, 2019 15:30
-
-
Save sdieunidou/ead54c2c1c8dc485421fd3b0d13612bd to your computer and use it in GitHub Desktop.
hytale-api.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HytaleApi = require('hytale-api-sdk'); | |
var api = new HytaleApi.ArticlesApi(); | |
var callback = function(error, data, response) { | |
if (error) { | |
console.error(error); | |
} else { | |
console.log('API called successfully. Returned data: ' + data); | |
console.log(data); | |
} | |
}; | |
// get latest articles | |
api.getArticles({}, callback); | |
// show article | |
var slug = "creating-creature-sounds-for-hytale"; // {String} Slug of article | |
api.getArticleBySlug(slug, callback); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment