All Projects → roccomuso → Termux

roccomuso / Termux

Licence: mit
Node.js module for Termux-API

Programming Languages

javascript
184084 projects - #8 most used programming language
js
455 projects

Projects that are alternatives of or similar to Termux

Node Zendesk
a zendesk API client library for use with node.js
Stars: ✭ 288 (+231.03%)
Mutual labels:  api, wrapper
Spotify Web Api Kotlin
Spotify Web API wrapper for Kotlin/JVM, Kotlin/Android, Kotlin/JS, and Kotlin/Native. Includes a Spotify Web Playback SDK wrapper for Kotlin/JS, and a spotify-auth wrapper for Kotlin/Android
Stars: ✭ 86 (-1.15%)
Mutual labels:  api, wrapper
Canvasapi
Python API wrapper for Instructure's Canvas LMS. Easily manage courses, users, gradebooks, and more.
Stars: ✭ 306 (+251.72%)
Mutual labels:  api, wrapper
Zenpy
Python wrapper for the Zendesk API
Stars: ✭ 222 (+155.17%)
Mutual labels:  api, wrapper
Twitchcsharp
Twitch C# Wrapper for the Twitch v3 REST API
Stars: ✭ 36 (-58.62%)
Mutual labels:  api, wrapper
Twitchio
TwitchIO - An Async Bot/API wrapper for Twitch made in Python.
Stars: ✭ 268 (+208.05%)
Mutual labels:  api, wrapper
Atlassian Python Api
Atlassian Python REST API wrapper
Stars: ✭ 564 (+548.28%)
Mutual labels:  api, wrapper
Fbrecog
An unofficial python wrapper for the Facebook face recognition endpoint
Stars: ✭ 184 (+111.49%)
Mutual labels:  api, wrapper
Swaddle
Automagically create API clients/wrappers in JavaScript
Stars: ✭ 23 (-73.56%)
Mutual labels:  api, wrapper
Wykop Es6
Wykop.pl API library
Stars: ✭ 17 (-80.46%)
Mutual labels:  api, wrapper
Api struct
API wrapper builder with response serialization
Stars: ✭ 224 (+157.47%)
Mutual labels:  api, wrapper
Omdb Graphql Wrapper
🚀 GraphQL wrapper for the OMDb API
Stars: ✭ 45 (-48.28%)
Mutual labels:  api, wrapper
Node Fb Messenger
✉️ Facebook Messenger Platform Node.js API Wrapper
Stars: ✭ 206 (+136.78%)
Mutual labels:  api, wrapper
Pycoingecko
Python wrapper for the CoinGecko API
Stars: ✭ 270 (+210.34%)
Mutual labels:  api, wrapper
Uniswap Python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 191 (+119.54%)
Mutual labels:  api, wrapper
Python Poloniex
Poloniex API wrapper for Python 2.7 & 3
Stars: ✭ 557 (+540.23%)
Mutual labels:  api, wrapper
Spaces Api
An API wrapper for DigitalOcean's Spaces object storage designed for easy use.
Stars: ✭ 166 (+90.8%)
Mutual labels:  api, wrapper
Wiki
Wikipedia Interface for Node.js
Stars: ✭ 180 (+106.9%)
Mutual labels:  api, wrapper
Inkwell
It's a New Kind of Wrapper for Exposing LLVM (Safely)
Stars: ✭ 732 (+741.38%)
Mutual labels:  api, wrapper
Termux Mpv
Wrapper for Mpv on Termux. Displays play controls in the notification
Stars: ✭ 43 (-50.57%)
Mutual labels:  wrapper, termux

termux

NPM Version Dependency Status JavaScript Style Guide

Comprehensive Node.js module for Termux-API

Install

  1. Make sure you've first installed the termux-api on your Android device from the Play store.

  2. Then install the scripts with apt install termux-api.

  3. Finally get this node module:

    $ npm install --save termux

Example usage

const api = require('termux')

if (!api.hasTermux) process.exit(1)

api.vibrate()
   .duration(1000)
   .run()

api.clipboardGet()
   .run()
   .then(function (text) {
     // ...
   })

Available methods

Every command instance has the .run() method that must be used to execute the command. It always return a Promise (eventually with results).

Method Description Parameters
.toast() Show a toast message
set the text to show .text(<str>)
show the toast for a short while .transient()
.vibrate() Vibrate your phone
set the duration in milliseconds .duration(<ms>)
force vibration even in silent mode .force()
.batteryStatus() Get the status of the device battery
.cameraInfo() Get info about device camera(s)
.cameraPhoto() Take a photo and save it to a file (JPEG format)
select the camera by ID .camera(<id>)
output photo file (NB. use an absolute path!) .outputFile(<str>)
.clipboardGet() Get the system clipboard text
.clipboardSet() Set the system clipboard text
text to copy in clipboard .text(<str>)
.contactList() Set the system clipboard text
.contactList() List all contacts
.dialog() Show a text entry dialog
dialog title .title(<str>)
hint to show when input is empty .hint(<str>)
use a textarea with multiple lines .multipleLines()
enter the input as a password .password()
.download() Download a resource using the download manager
set the resource to download .url(<str>)
title for the download request .title(<str>)
description for the download request .description(<str>)
.infraredFrequencies() Query the infrared transmitter's supported carrier frequencies
.infraredTransmit() Transmit an infrared pattern
specify the pattern to transmit as array of numbers .frequency(<Array>)
.location() Get the device location
location provider (gps/network/passive) .provider(<enum>)
kind of request to make (once/last/updates) .request(<enum>)
.notification() Display a system notification
notification content to show .content(<str>)
notification id (will overwrite any previous notification with the same id) .id(<int>)
notification title to show .title(<str>)
notification url when clicking on it .url(<str>)
notification action when clicking on button1 .button1(<str>, <str>)
notification action when clicking on button2 .button2(<str>, <str>)
notification action when clicking on button3 .button3(<str>, <str>)
notification action when tapping on it .tap(<str>)
notification action when deleting it .delete(<str>)
notification image to show .image(<path>)
makes notification unremovable, need .id .pin()
.share() share a file specified as argument
provide a file to share .file(<path>)
which action to perform on the file (edit/send/view) .action(<enum>)
content-type to use (default: guessed from file extension) .contentType(<str>)
share to the default receiver instead of showing a chooser .default()
title to use for shared content (default: shared file name) .title(<str>)
.smsInbox() List received SMS messages
show dates when messages were created .date()
limit in sms list (default: 10) .limit(<int>)
show phone numbers .showNumbers()
offset in sms list (default: 0) .offset(<int>)
.smsSend() Send a SMS message to the specified recipient number(s)
Recipient number(s), gotta be an Array .numbers(<Array>)
The SMS text .text(<str>)
.telephonyCellInfo() Get information about all observed cell information from all radios on the device
.telephonyDeviceInfo() Get information about the telephony device
.ttsEngines() Get information about the available text-to-speech (TTS) engines
.ttsSpeak() Speak text with a system text-to-speech (TTS) engine
Text to speak, passed to the engine .text(<str>)
TTS engine to use, see .ttsEngines() .engine(<id>)
language to use (may be unsupported by the engine) .language(<enum>)
pitch to use in speech (1.0 is normal) .pitch(<num>)
speech rate to use (1.0 is normal) .rate(<num>)
audio stream to use (ALARM/MUSIC/NOTIFICATION/RING/SYSTEM/VOICE_CALL) .stream(<enum>)

Dependency

It uses has-termux-api to check if termux-api is installed.

Debug

Set the env DEBUG: DEBUG=termux

Author

Rocco Musolino (@roccomuso)

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].