hytale-api-sdk

1.0.3 • Public • Published

Hytale API - Javascript SDK

Hytale Api - JavaScript client for Hytale Official API

For more information, please visit https://hytale.game

Installation

For Node.js

npm

Then install it via:

npm install hytale-api-sdk --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var HytaleApi = require('hytale-api-sdk');
 
var api = new HytaleApi.ArticlesApi();
 
var slug = "creating-creature-sounds-for-hytale"; // {String} Slug of article
 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully');
    console.log(data);
  }
};
 
api.getArticleBySlug(slug, callback);

Documentation for API Endpoints

All URIs are relative to https://hytale.com/api

Class Method HTTP request Description
HytaleApi.ArticlesApi getArticleBySlug GET /blog/post/slug/{slug}
HytaleApi.ArticlesApi getArticles GET /blog/post/published
HytaleApi.ArticlesApi getArticlesOfMonthAndYear GET /blog/post/archive/{year}/{month}/
HytaleApi.JobsApi getJobs GET /job/listing

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Readme

Keywords

none

Package Sidebar

Install

npm i hytale-api-sdk

Homepage

hytale.game

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

68.5 kB

Total Files

23

Last publish

Collaborators

  • sdieunidou