@ricardoneud.com/api
v1.2.1
Published
Official SDK for the API from Ricardoneud.com, fully compatible with all environments supported by npm
Readme
NPM Module for API Usage
This guide explains how to use the official NPM module to interact with the API. It covers installation, setup, authentication, and using the main modules such as games, tools, reseller, and user management.
⚠️ Important: Always verify which endpoints are available in which version. Not all endpoints exist in every version, and some features are only available from v3 and above. Make sure your project uses a supported API version.
Installation
npm install @ricardoneud.com/apiOR
yarn add @ricardoneud.com/apiInitialization
The client can be initialized with either an API Key, a Secret token, and optionally a custom URL:
const RicardoNeudAPI = require('@ricardoneud.com/api');
const api = new RicardoNeudAPI({
apiKey: 'your-api-key', // OR use secret: 'your-secret'
version: 'v4'
});Changing Base URL
You can change the API endpoint at runtime using setURL:
api.setURL('https://sandbox.api.ricardoneud.com'); // Switch to sandbox environmentChanging Version
api.setVersion('v4'); // Verify which endpoints are supported in v4Authentication
API Key
- Log in at Ricardoneud.com
- Go to Dashboard → API Keys
- Click Create API Key, configure permissions, and set environment to
Production. - Use the API Key in your client:
api.setApiKey('your-api-key');Secret Token (Login-based)
Short-lived tokens provide session-based access (valid for 24 hours).
const loginResponse = await api.user.login('usernameOrEmail', 'password', true);
console.log(loginResponse.secret); // Use this token in subsequent requestsconst api = new RicardoNeudAPI({ secret: 'your-secret' });You can revoke tokens when needed:
await api.user.revokeSecret('usernameOrEmail', 'password', 'your-secret');Core Modules
Games
const server = await api.games.minecraft('play.hypixel.net');
const fivemServer = await api.games.fivem('127.0.0.1', '30120');Tools
const dns = await api.tools.dnsCheck('example.com', 'A');
const domain = await api.tools.domainCheck('google.com');
const subdomains = await api.tools.subdomainFinder('example.com');
const geoip = await api.tools.geoIP('8.8.8.8');Mail verification:
const mail = await api.tools.mailCheck('example.com', 'selector');
const mailHost = await api.tools.mailHostCheck('example.com');Reseller
await api.reseller.checkLicense('LICENSE_KEY');
await api.reseller.generateLicense({
registeredTo: 'John Doe',
domainOrIp: 'example.com',
status: 'active',
productId: 123,
projectId: 456
});
await api.reseller.updateLicense('LICENSE_KEY', { status: 'inactive' });
await api.reseller.deleteLicense('LICENSE_KEY');User
const loginResponse = await api.user.login('usernameOrEmail', 'password', true);
await api.user.revokeSecret('usernameOrEmail', 'password', 'secret-token');OAuth2
const token = await api.oauth2.getAccessToken('code', 'redirectUri', 'clientId', 'clientSecret');
const profile = await api.oauth2.getProfile(token.access_token);Request Handling
All HTTP requests are handled internally with Axios, including error handling. Every method returns a Promise.
try {
const result = await api.tools.geoIP('8.8.8.8');
console.log(result);
} catch (error) {
console.error(error.status, error.message, error.data);
}TypeScript Support
import RicardoNeudAPI, { Games, Tools, Reseller, User, OAuth2 } from '@ricardoneud.com/api';
const api = new RicardoNeudAPI({ apiKey: 'your-api-key', version: 'v4' });Notes
- You must provide either an API Key or a Secret token.
- Secret tokens expire after 24 hours and are visible in your dashboard.
- API Key and Secret are mutually exclusive; setting one clears the other.
- You can optionally provide a custom
baseURLat initialization. If omitted, the SDK defaults tohttps://api.ricardoneud.com. - The
setURLmethod allows switching API domains at runtime (e.g., sandbox or custom client endpoints). - Always check the supported API version to ensure endpoint compatibility.
