nobloxmmc.js
Version:
A Node.js wrapper for ROBLOX. (original from sentanos)
26 lines (22 loc) • 803 B
JavaScript
const http = require('../util/http.js').func
exports.required = ['universeId', 'productName']
exports.optional = ['jar', 'productId']
exports.func = (args) => {
const jar = args.jar
let universeId = parseInt(args.universeId) ? parseInt(args.universeId) : 0
let productId = parseInt(args.productId) ? parseInt(args.productId) : 0
return http({
url: '//www.roblox.com/places/check-developerproduct-name?universeId=' + universeId + '&developerProductId=' + productId + '&developerProductName=' + args.productName + '&_=1515792139751',
options: {
method: 'GET',
jar: jar,
resolveWithFullResponse: true
}
}).then((res) => {
if (res.statusCode !== 200) {
throw new Error('You are not logged in')
} else {
return JSON.parse(res.body)
}
})
}