-
Notifications
You must be signed in to change notification settings - Fork 0
Products API
Enzo Z edited this page Oct 26, 2024
·
4 revisions
Each method corresponds to products detail or action you can perform.
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));
-
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)
Created by FlanZCode, this project is under MIT license.