{ "info": { "author": "Team Pindo", "author_email": "team@pindo.io", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# pindo-cli\n\n![travis](https://travis-ci.org/pindo-io/pindo-cli.svg?branch=master)\n![fury](https://badge.fury.io/py/pindo-cli.svg)\n![pipy](https://pypip.in/d/pindo-cli/badge.png)\n\n## Installation\n\nInstall from PyPi using [pip](http://www.pip-installer.org/en/latest), a package manager for Python.\n\n`pip3 install pindo-cli`\n\nDon't have pip installed? Try installing it, by running this from the command line:\n\n`$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python`\n\n`python setup.py install`\n\nYou may need to run the above commands with `sudo`.\n\n## Getting Started\n\nOnce you're have install **Pindo CLI** you're ready to go.\n\n`pindo --help`\n\n## Create an account\n\nFor creating a Pindo account you need to provide your username, email, and password\n\n`pindo register`\n\n## Token\n\nRequesting a token require you to provide your username and password\n\n`pindo token`\n\nRefresh your token\n\n`pindo refresh-token`\n\n## Send a test message\n\nSending a test message will require you providing the requested token, a receiver, the message your want to send, and also the sender id.\n\n`pindo sms`\n\n## API Usage\n\nThe `pindo api` needs your Token. You can either pass the token directly to the constructor (see the code below) or via environment variables.\n\n```bash\n\n# cURL\n\ncurl -X POST \\\nhttp://api.pindo.io/v1/sms/ \\\n-H 'Accept: */*' \\\n-H 'Authorization: Bearer your-token' \\\n-H 'Content-Type: application/json' \\\n-d '{\n\"to\" : \"+250781234567\", \n\"text\" : \"Hello from Pindo\",\n\"sender\" : \"Pindo\"\n}'\n```\n\n```python\n\n# python\n\nimport requests\n\ntoken='your-token'\nheaders = {'Authorization': 'Bearer ' + token}\ndata = {'to' : '+250781234567', 'text' : 'Hello from Pindo', 'sender' : 'Pindo'}\n\nurl = 'http://api.pindo.io/v1/sms/'\nresponse = requests.post(url, json=data, headers=headers)\nprint(response)\nprint(response.json())\n\n```\n\n```javascript\n// NodeJS\n\nvar request = require(\"request\");\ndata = { to: \"+250781234567\", text: \"Hello from Pindo\", sender: \"Pindo\" };\n\nvar options = {\nmethod: \"POST\",\nbody: data,\njson: true,\nurl: \"http://api.pindo.io/v1/sms/\",\nheaders: {\nAuthorization: \"Bearer your-token\"\n}\n};\n\nfunction callback(error, response, body) {\nif (!error && response.statusCode == 200) {\nconsole.log(body);\n}\n}\n//call the request\n\nrequest(options, callback);\n```\n\n```java\n\n// Java\n\nOkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\"to\" : \"+250781234567\", \"text\" : \"Hello from Pindo\",\"sender\" : \"Pindo\"}\");\nRequest request = new Request.Builder()\n.url(\"http://api.pindo.io/v1/sms/\")\n.post(body)\n.addHeader(\"Content-Type\", \"application/json\")\n.addHeader(\"Authorization\", \"Bearer your-token\")\n.build();\nResponse response = client.newCall(request).execute();\n```\n\n\n```php\n\n// PHP\n\n$request = new HttpRequest();\n$request->setUrl('http://api.pindo.io/v1/sms/');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders(array(\n'Authorization' => 'Bearer your-token',\n'Content-Type' => 'application/json'\n));\n\n$request->setBody('{\n\"to\" : \"+250781234567\", \n\"text\" : \"Hello from Pindo\",\n\"sender\" : \"Pindo\"\n}');\n\ntry {\n$response = $request->send();\n\necho $response->getBody();\n} catch (HttpException $ex) {\necho $ex;\n}\n```\n\n```Go\n\n// GO\n\npackage main\n\nimport (\n\"fmt\"\n\"strings\"\n\"net/http\"\n\"io/ioutil\"\n)\n\nfunc main() {\n\nurl := \"http://api.pindo.io/v1/sms/\"\n\npayload := strings.NewReader(\"{\"to\" : \"+250781234567\", \"text\" : \"Hello from Pindo\",\"sender\" : \"Pindo\"}\")\n\nreq, _ := http.NewRequest(\"POST\", url, payload)\n\nreq.Header.Add(\"Content-Type\", \"application/json\")\nreq.Header.Add(\"Authorization\", \"Bearer your-token\")\n\nres, _ := http.DefaultClient.Do(req)\n\ndefer res.Body.Close()\nbody, _ := ioutil.ReadAll(res.Body)\n\nfmt.Println(res)\nfmt.Println(string(body))\n\n}\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/pindo-io/pindo-cli", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pindo-cli", "package_url": "https://pypi.org/project/pindo-cli/", "platform": "any", "project_url": "https://pypi.org/project/pindo-cli/", "project_urls": { "Homepage": "http://github.com/pindo-io/pindo-cli" }, "release_url": "https://pypi.org/project/pindo-cli/0.1.7/", "requires_dist": null, "requires_python": "", "summary": "Pindo is a communication platform for humans and machines", "version": "0.1.7" }, "last_serial": 5229500, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7b6de2548aea67123eb4a3579b5003d8", "sha256": "595475930ae5a634d14a4c28123d81a9ea7232866219c65865b2d23501623cac" }, "downloads": -1, "filename": "pindo-cli-0.1.tar.gz", "has_sig": false, "md5_digest": "7b6de2548aea67123eb4a3579b5003d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2864, "upload_time": "2018-12-07T19:44:09", "url": "https://files.pythonhosted.org/packages/a3/1d/1fe0942a3a672a0074bea9bcbe10bb1ccf3862e25bc5354c4fd7827c8c08/pindo-cli-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "44f43a339b4217571fefa3b5dd5bab12", "sha256": "9326d224e3c2e7a3dfbd2cfb4aecc9a8eaa6a9f2d2d1bfeecc3f90171fd89928" }, "downloads": -1, "filename": "pindo-cli-0.1.1.tar.gz", "has_sig": false, "md5_digest": "44f43a339b4217571fefa3b5dd5bab12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2857, "upload_time": "2018-12-08T09:30:22", "url": "https://files.pythonhosted.org/packages/6e/97/50c0ff5434e092d4df59584ef5825d770bc90ff643ca0c3dd74a0cb8c7f2/pindo-cli-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "cb02fd58d29c439e56a6a838c76b9dcd", "sha256": "e782cc229e6daaccb2b8466d1edfea737d079578c2f63c2f28c758677bffad15" }, "downloads": -1, "filename": "pindo-cli-0.1.2.tar.gz", "has_sig": false, "md5_digest": "cb02fd58d29c439e56a6a838c76b9dcd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2860, "upload_time": "2018-12-08T13:09:41", "url": "https://files.pythonhosted.org/packages/be/37/5ab3a19e19645d1f0aa201f2b3c542b35801745ca93b29ead3f56a286e17/pindo-cli-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7e0fbbf03a48d79a73b53f92033a5d90", "sha256": "db62c822359452a63f94c3190d76a9be2e057a13ab4f073c83d74fe086a8d67c" }, "downloads": -1, "filename": "pindo-cli-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7e0fbbf03a48d79a73b53f92033a5d90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3408, "upload_time": "2019-04-18T14:21:57", "url": "https://files.pythonhosted.org/packages/7e/62/ffa57bd89d47860f23f85a2fdab961efd47afbdf289dd729ab267bfc9bc8/pindo-cli-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "f7a4e1e450c214d43c70fe2f82b3723a", "sha256": "10fbdd6f6fec0d130637de77cb6fa8447b58df2098ac24c1b761c31a994f4367" }, "downloads": -1, "filename": "pindo-cli-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f7a4e1e450c214d43c70fe2f82b3723a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3408, "upload_time": "2019-04-18T15:49:57", "url": "https://files.pythonhosted.org/packages/62/30/f84879a06983ae70d7d99d1bf51e985045739676ed07bd73522883e38fdf/pindo-cli-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "fab22d4667be3bcc4829f594b99d4ccd", "sha256": "18f558fc4ed5871e648588dd89b653fdfae61763153f0a73fbdcb8008e72112e" }, "downloads": -1, "filename": "pindo-cli-0.1.5.tar.gz", "has_sig": false, "md5_digest": "fab22d4667be3bcc4829f594b99d4ccd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3729, "upload_time": "2019-04-28T08:00:33", "url": "https://files.pythonhosted.org/packages/77/d5/62aab7ea86b3fa9efe0ea8d2d6e17da9ba98b79b1d649b9039f1c880019d/pindo-cli-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "4589c0b93a8b8eb65ccb772c18efe074", "sha256": "b45f156a4ee35e93f8216c51cdc0fc07109068c76d5137ebd5b2e18bb96243dd" }, "downloads": -1, "filename": "pindo-cli-0.1.6.tar.gz", "has_sig": false, "md5_digest": "4589c0b93a8b8eb65ccb772c18efe074", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4657, "upload_time": "2019-04-28T08:23:45", "url": "https://files.pythonhosted.org/packages/80/9c/57a4ecdc87e629ed3cf627400d3cc2c67aac73f374ac6d7d1d6ff51e9c58/pindo-cli-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "f58519dfbc3d3f5e7ef02ecc68cc2037", "sha256": "9519ed6e330ae2ae73bcb56d4e9498d30fd426cefde3798defccdf9daa4fb515" }, "downloads": -1, "filename": "pindo-cli-0.1.7.tar.gz", "has_sig": false, "md5_digest": "f58519dfbc3d3f5e7ef02ecc68cc2037", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4605, "upload_time": "2019-05-05T20:09:15", "url": "https://files.pythonhosted.org/packages/a2/0e/aff0e29e969af03c82f11f1f3c50ad0370f4be6d71405053fb684b6dd9f4/pindo-cli-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f58519dfbc3d3f5e7ef02ecc68cc2037", "sha256": "9519ed6e330ae2ae73bcb56d4e9498d30fd426cefde3798defccdf9daa4fb515" }, "downloads": -1, "filename": "pindo-cli-0.1.7.tar.gz", "has_sig": false, "md5_digest": "f58519dfbc3d3f5e7ef02ecc68cc2037", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4605, "upload_time": "2019-05-05T20:09:15", "url": "https://files.pythonhosted.org/packages/a2/0e/aff0e29e969af03c82f11f1f3c50ad0370f4be6d71405053fb684b6dd9f4/pindo-cli-0.1.7.tar.gz" } ] }