mtasa-api
Version:
Get data from MTA SA API easily.
31 lines (20 loc) • 547 B
Markdown
## MTA:SA API
##### The Simplest way to obtain data from MTASA servers.
#### Functions
- getAll
- getBy({ ip: string, port?: number } )
- search ({ name?: string, ip?: number, version?: string })
- setTick(seconds: int)
### Example
```js
import MtaSA from 'mtasa-api'
const mtaAPI = new MtaSA()
const example = async () => {
await mtaAPI.build() // Build the API first
const alanticServer = mtaAPI.getBy({ ip: '149.56.228.58', port: 22003 })
console.log(alanticServer)
}
example()
```