A simple notification helper to send messages to LINE Notify
Project description
# nonoLINE
[![PyPI version](https://badge.fury.io/py/nono-line.svg)](https://badge.fury.io/py/nono-line)<br/>
notify, notify to LINE, short for nonoLINE.<br/>
A simple notification helper to send messages to [LINE Notify](https://notify-bot.line.me/en/), which supports REST API interfaces which can be accessed with the access token acquired in advance. With nonoLINE, you are able to send some messages to a chat room of LINE with ease in your Python environment!
## Getting Started
1. nonoLINE supports both Python2 and Python3. If you would like to install nonoLINE, just use pip like below.
```shell
$ pip install nono-line
```
2. Login to [the mypage of LINE Notify](https://notify-bot.line.me/my/). If you are not LINEr yet, register to it as a new user.
3. Generate an access token for a specific chat and memorize it.
## Usage
```python
# Import Python library
from nonoLINE import nonoLINE
# Create a new nonoLINE object.
nono_line = nonoLINE('YOUR_ACCESS_TOKEN', max_workers=4)
# Send a test message to LINE Notify.
nono_line.send('test message')
# Send a test message to LINE Notify asynchronously.
nono_line.send('test message', send_async=True)
# Send a test message with a sticker to LINE Notify.
# LINE Sticker list is here, https://devdocs.line.me/files/sticker_list.pdf.
# sticker__id_pkgid is a tuple (STKID, STKPKGID).
nono_line.send('test message', sticker__id_pkgid=(11, 1))
# Send a test message with a sticker list to LINE Notify.
# sticker__id_pkgid is able to set as a list of tuple (STKID, STKPKGID).
# In this case, a sticker will be selected randomly before sending the message.
nono_line.send('test message', sticker__id_pkgid=[(11, 1), (18, 2), (194, 3), (272, 4)])
```
## API Rate Limit
The limit of API calls per hour is set to 1000. The limit is per access token.
## Reference
* [LINE Notify API Document](https://notify-bot.line.me/doc/en/)
* [LINE Sticker list](https://devdocs.line.me/files/sticker_list.pdf)
## Version History
* 2017.12.29 : v0.0.4
* Set a parent class(object) to nonoLINE.
* 2017.12.28 : v0.0.3
* If you pass a sticker list to send(), a sticker will be selected randomly.
* 2017.12.27 : v0.0.2
* First version release
[![PyPI version](https://badge.fury.io/py/nono-line.svg)](https://badge.fury.io/py/nono-line)<br/>
notify, notify to LINE, short for nonoLINE.<br/>
A simple notification helper to send messages to [LINE Notify](https://notify-bot.line.me/en/), which supports REST API interfaces which can be accessed with the access token acquired in advance. With nonoLINE, you are able to send some messages to a chat room of LINE with ease in your Python environment!
## Getting Started
1. nonoLINE supports both Python2 and Python3. If you would like to install nonoLINE, just use pip like below.
```shell
$ pip install nono-line
```
2. Login to [the mypage of LINE Notify](https://notify-bot.line.me/my/). If you are not LINEr yet, register to it as a new user.
3. Generate an access token for a specific chat and memorize it.
## Usage
```python
# Import Python library
from nonoLINE import nonoLINE
# Create a new nonoLINE object.
nono_line = nonoLINE('YOUR_ACCESS_TOKEN', max_workers=4)
# Send a test message to LINE Notify.
nono_line.send('test message')
# Send a test message to LINE Notify asynchronously.
nono_line.send('test message', send_async=True)
# Send a test message with a sticker to LINE Notify.
# LINE Sticker list is here, https://devdocs.line.me/files/sticker_list.pdf.
# sticker__id_pkgid is a tuple (STKID, STKPKGID).
nono_line.send('test message', sticker__id_pkgid=(11, 1))
# Send a test message with a sticker list to LINE Notify.
# sticker__id_pkgid is able to set as a list of tuple (STKID, STKPKGID).
# In this case, a sticker will be selected randomly before sending the message.
nono_line.send('test message', sticker__id_pkgid=[(11, 1), (18, 2), (194, 3), (272, 4)])
```
## API Rate Limit
The limit of API calls per hour is set to 1000. The limit is per access token.
## Reference
* [LINE Notify API Document](https://notify-bot.line.me/doc/en/)
* [LINE Sticker list](https://devdocs.line.me/files/sticker_list.pdf)
## Version History
* 2017.12.29 : v0.0.4
* Set a parent class(object) to nonoLINE.
* 2017.12.28 : v0.0.3
* If you pass a sticker list to send(), a sticker will be selected randomly.
* 2017.12.27 : v0.0.2
* First version release
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
nono-line-0.0.4.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file nono-line-0.0.4.tar.gz
.
File metadata
- Download URL: nono-line-0.0.4.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c201085d1221eced8278e332e549bb50d5e5744199e2d79f22fbb32c31bfce35 |
|
MD5 | ff08774f39d3f03c25d436b197e616d4 |
|
BLAKE2b-256 | 3bc231756ce0ecc9614aa461a76d7bce8b8707336058d221f6ad36fb4ee44b62 |
File details
Details for the file nono_line-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: nono_line-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1033561241467e5cae8d2c9f21805519c756ec575a8733510fb34579e45dda7 |
|
MD5 | 7dea83c2235f28164d71752d531868a4 |
|
BLAKE2b-256 | 71d005d960b442b033aa6cae62dd315a2435a8811e362f170ac8ac6db7b620f2 |