Skip to content

Instantly share code, notes, and snippets.

@sdieunidou
Last active April 29, 2019 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdieunidou/ead54c2c1c8dc485421fd3b0d13612bd to your computer and use it in GitHub Desktop.
Save sdieunidou/ead54c2c1c8dc485421fd3b0d13612bd to your computer and use it in GitHub Desktop.
hytale-api.js
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