Skip to content

Products API

Enzo Z edited this page Oct 26, 2024 · 4 revisions

Each method corresponds to products detail or action you can perform.

Example Usage

const { HMSClient } = require('hostmyservers.js');
const apiKey = 'api-key'
const productId = 'product-id'

const client = new HMSClient(apiKey);

client.products.getProductById(productId)
  .then(data => console.log(data))
  .catch(error => console.error('Error fetching user details:', error));

Products Methods

/products

  • getList => Returns list of your products.
  • getProductById => Returns information of a specific product (Require: Id)
  • getId => Return the ID of a specific product (Require: Id)
  • getOfferId => Return the offer ID of a specific product (Require: Id)
  • getCreatedAt => Return the creation date of a specific product (Require: Id)
  • getExpiredAt => Return the expiration date of a specific product (Require: Id)
  • getStatus => Return the status of a specific product (Require: Id)
  • getOs => Return the OS full name of a specific product (Require: Id)
  • getIpv4 => Return the IPv4 address of a specific product (Require: Id)
  • getIpv6 => Return the IPv6 address of a specific product (Require: Id)
  • getVmid => Return the VMID of a specific product (Require: Id)
  • getOsShort => Return the OS of a specific product (Require: Id)
  • getServerId => Return the server ID of a specific product (Require: Id)
  • createProduct => Create a specific product (❌ Not working)
Clone this wiki locally