npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

qcoreapilib

v1.0.0

Published

Ceci est la documentation en rapport avec QCore.

Downloads

2

Readme

Getting started

Ceci est la documentation en rapport avec QCore.

How to Build

The generated SDK relies on Node Package Manager (NPM) being available to resolve dependencies. If you don't already have NPM installed, please go ahead and follow instructions to install NPM from here. The SDK also requires Node to be installed. If Node isn't already installed, please install it from here

NPM is installed by default when Node is installed

To check if node and npm have been successfully installed, write the following commands in command prompt:

  • node --version
  • npm -version

Version Check

Now use npm to resolve all dependencies by running the following command in the root directory (of the SDK folder):

npm install

Resolve Dependencies

Resolve Dependencies

This will install all dependencies in the node_modules folder.

Once dependencies are resolved, you will need to move the folder QCOREApiLib in to your node_modules folder.

How to Use

The following section explains how to use the library in a new project.

1. Open Project Folder

Open an IDE/Text Editor for JavaScript like Sublime Text. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.

Click on File and select Open Folder.

Open Folder

Select the folder of your SDK and click on Select Folder to open it up in Sublime Text. The folder will become visible in the bar on the left.

Open Project

2. Creating a Test File

Now right click on the folder name and select the New File option to create a new test file. Save it as index.js Now import the generated NodeJS library using the following lines of code:

var lib = require('lib');

Save changes.

Create new file

Save new file

3. Running The Test File

To run the index.js file, open up the command prompt and navigate to the Path where the SDK folder resides. Type the following command to run the file:

node index.js

Run file

How to Test

These tests use Mocha framework for testing, coupled with Chai for assertions. These dependencies need to be installed for tests to run. Tests can be run in a number of ways:

Method 1 (Run all tests)

  1. Navigate to the root directory of the SDK folder from command prompt.
  2. Type mocha --recursive to run all the tests.

Method 2 (Run all tests)

  1. Navigate to the ../test/Controllers/ directory from command prompt.
  2. Type mocha * to run all the tests.

Method 3 (Run specific controller's tests)

  1. Navigate to the ../test/Controllers/ directory from command prompt.
  2. Type mocha QCORE ApiController to run all the tests in that controller file.

To increase mocha's default timeout, you can change the TEST_TIMEOUT parameter's value in TestBootstrap.js.

Run Tests

Initialization

API client can be initialized as following:

const lib = require('lib');

Class Reference

List of Controllers

Class: MiscController

Get singleton instance

The singleton instance of the MiscController class can be accessed from the API Client.

var controller = lib.MiscController;

Method: getServersLists

Tags: Skips Authentication

Retournes une liste qui contient les serveurs actuellements achetés par l'utilisateur.

function getServersLists(authorization, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | authorization | Required | L'id de l'utilisateur |

Example Usage


    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';

    controller.getServersLists(authorization, function(error, response, context) {

    
    });

Method: getStartServer

Tags: Skips Authentication

Cette commande allume un serveur, retourne un message d'erreur si la machine est déjà lancé ou affiche simplement 200 si le lancement et ok.

function getStartServer(id, authorization, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | id | Required | L'id du serveur à lancé | | authorization | Required | TODO: Add a parameter description |

Example Usage


    var id = 21945158;
    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';

    controller.getStartServer(id, authorization, function(error, response, context) {

    
    });

Method: getShowServer

Tags: Skips Authentication

show info for an linode server

function getShowServer(id, authorization, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | id | Required | TODO: Add a parameter description | | authorization | Required | TODO: Add a parameter description |

Example Usage


    var id = 21945288;
    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';

    controller.getShowServer(id, authorization, function(error, response, context) {

    
    });

Method: getStopUnServeur

Tags: Skips Authentication

stop a linode server

function getStopUnServeur(id, authorization, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | id | Required | L'id du serveur | | authorization | Required | TODO: Add a parameter description |

Example Usage


    var id = 21945288;
    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';

    controller.getStopUnServeur(id, authorization, function(error, response, context) {

    
    });

Method: getBaseLinode

Tags: Skips Authentication

Base url, return personal linode info

function getBaseLinode(authorization, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | authorization | Required | L'id de l'utilisateur, pour le développement: 7ljr0lDUETeCWbPDJLOuFUkPmr42 |

Example Usage


    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';

    controller.getBaseLinode(authorization, function(error, response, context) {

    
    });

Method: createMcStart

Tags: Skips Authentication

Launch a minecraft server

function createMcStart(authorization, serverId, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | authorization | Required | TODO: Add a parameter description | | serverId | Required | TODO: Add a parameter description |

Example Usage


    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';
    var serverId = 21945504;

    controller.createMcStart(authorization, serverId, function(error, response, context) {

    
    });

Method: createGmodStart

Tags: Skips Authentication

Launch a gmod server

function createGmodStart(authorization, serverId, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | authorization | Required | TODO: Add a parameter description | | serverId | Required | TODO: Add a parameter description |

Example Usage


    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';
    var serverId = 21945504;

    controller.createGmodStart(authorization, serverId, function(error, response, context) {

    
    });

Method: createGmodStop

Tags: Skips Authentication

Stop a gmod server

function createGmodStop(authorization, serverId, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | authorization | Required | TODO: Add a parameter description | | serverId | Required | TODO: Add a parameter description |

Example Usage


    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';
    var serverId = 21945504;

    controller.createGmodStop(authorization, serverId, function(error, response, context) {

    
    });

Method: createGmodDetails

Tags: Skips Authentication

Details a gmod server

function createGmodDetails(authorization, serverId, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | authorization | Required | TODO: Add a parameter description | | serverId | Required | TODO: Add a parameter description |

Example Usage


    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';
    var serverId = 21945504;

    controller.createGmodDetails(authorization, serverId, function(error, response, context) {

    
    });

Method: createMcStop

Tags: Skips Authentication

Stop a minecraft server

function createMcStop(authorization, serverId, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | authorization | Required | TODO: Add a parameter description | | serverId | Required | TODO: Add a parameter description |

Example Usage


    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';
    var serverId = 21945504;

    controller.createMcStop(authorization, serverId, function(error, response, context) {

    
    });

Method: createMcDetails

Tags: Skips Authentication

get details about a minecraft

function createMcDetails(authorization, serverId, callback)

Parameters

| Parameter | Tags | Description | |-----------|------|-------------| | authorization | Required | TODO: Add a parameter description | | serverId | Required | TODO: Add a parameter description |

Example Usage


    var authorization = '7ljr0lDUETeCWbPDJLOuFUkPmr42';
    var serverId = 21945504;

    controller.createMcDetails(authorization, serverId, function(error, response, context) {

    
    });

Back to List of Controllers