hytale.js
v1.0.0
Published
Unofficial JavaScript library for interacting with Hytale-related APIs and tooling (planned).
Readme
hytale.js
⚠️ Unofficial project
hytale.js is a JavaScript/TypeScript library for interacting with Hytale-related APIs and services.
This package is not affiliated with or endorsed by Hypixel Studios.
Features
- 🔌 API Client - HTTP client for Hytale API endpoints
- 📝 Blog Posts - Fetch and manage Hytale blog posts
- 💾 Caching - Built-in caching system for efficient data management
- 📦 TypeScript - Full TypeScript support with type definitions
Installation
npm install hytale.jsUsage
Basic Setup
import { Hytale } from 'hytale.js';
const hytale = new Hytale();Fetching Blog Posts
// Fetch published blog posts
const posts = await hytale.blogPosts.fetchPublished(10);
// Fetch a specific blog post by slug
const post = await hytale.blogPosts.fetchBySlug('some-blog-post-slug');
// Access cached posts
const cachedPost = hytale.blogPosts.cache.get('post-id');Blog Post Properties
const post = await hytale.blogPosts.fetchBySlug('example-post');
console.log(post.title); // Post title
console.log(post.author); // Author name
console.log(post.body); // Post content
console.log(post.publishedAt); // Publication date
console.log(post.url); // Full URL to the blog post
console.log(post.tags); // Array of tags
console.log(post.featured); // Whether the post is featuredStatus
🚧 In Active Development - Core blog post functionality is implemented. More features are planned.
License
MIT
