Skip to main content

Pindo is a communication platform for humans and machines

Project description

pindo-cli

travis fury pipy

Installation

Install from PyPi using pip, a package manager for Python.

pip3 install pindo-cli

Don't have pip installed? Try installing it, by running this from the command line:

$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python

python setup.py install

You may need to run the above commands with sudo.

Getting Started

Once you're have install Pindo CLI you're ready to go.

pindo --help

Create an account

For creating a Pindo account you need to provide your username, email, and password

pindo register

Token

Requesting a token require you to provide your username and password

pindo token

Refresh your token

pindo refresh-token

Send a test message

Sending a test message will require you providing the requested token, a receiver, the message your want to send, and also the sender id.

pindo sms

API Usage

The pindo api needs your Token. You can either pass the token directly to the constructor (see the code below) or via environment variables.

# python

import requests

token='kbkcmbkcmbkcbc9ic9vixc9vixc9v'
headers = {'Authorization': 'Bearer ' + token}
data = {'to' : '+250700000000', 'text' : 'Hello from Pindo', 'sender' : 'Pindo'}

url = 'http://api.pindo.io/v1/sms/'
response = requests.post(url, json=data, headers=headers)
print(response)
print(response.json())
// NodeJS

var request = require("request");
data = { to: "+250700000000", text: "Hello from Pindo", sender: "Pindo" };

var options = {
  method: "POST",
  body: data,
  json: true,
  url: "http://api.pindo.io/v1/sms/",
  headers: {
    Authorization: "Bearer your-token"
  }
};

function callback(error, response, body) {
  if (!error && response.statusCode == 200) {
    console.log(body);
  }
}
//call the request

request(options, callback);

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pindo-cli-0.1.5.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page