mtasa-sdk

1.0.0 • Public • Published

mtasa-sdk v1.0.0

A module to facilitate calling http exported functions from MTA:SA servers.

Installation

var MTA = require('mtasa-sdk');

Usage

MTA Class

The module exports a class, the MTA class. Instantiating the class requires you to specify a host and port to the MTA:SA server.

Syntax:

MTA(host='localhost', port=22005, username='', password='') // Contrustor
MTA.prototype.call(resource_name, function_name, arguments={})

Example

var MTA = require('mtasa-sdk');
 
var myserver = new MTA(); // Connect to http://localhost:22005
myserver.call('resource', 'exportedFunction', ['arg1', 'arg2', 5, ['table']]);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    14
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    14

Package Sidebar

Install

npm i mtasa-sdk

Weekly Downloads

14

Version

1.0.0

License

MIT

Last publish

Collaborators

  • jr10