Skip to content

reud/PyLineNotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pylinenotify

If you have confidence in English Skills, Plz read this page and send pull request,take it easy.

A Library that manipulates LineNotify easily in Python.

あなたが日本語話者の場合、こちらの方が快適に読み進める事が出来るでしょう -> README_JP.md

Description

It can easily use LINENotify

Requirement

Python 3.5+

If you want to know what it need, see requirements.txt

Usage

Cation: If you dont have LINENotify Access Token,You can get from this

Below code is send 'Hello World' to LINENotify.

import pylinenotify

TOKEN = 'YOUR_ACCESS_TOKEN'

pylinenotify.send_message(token=TOKEN,message='Hello World!')

# same as pylinenotify.send_sticker(TOKEN, 'Hello World!')

below screenshot is the result.

messageサンプル

We can send a photo.(But a message need)

Below code is send miku.jpg in same directory to LINENotify.

import pylinenotify

TOKEN = 'YOUR_ACCESS_TOKEN'

pylinenotify.send_photo_with_message(token=TOKEN, message='Hatune Miku', path='miku.jpg')

# same as pylinenotify.send_photo_with_message(TOKEN,'Hatune Miku','miku.jpg')

below screenshot is the result.

photoサンプル

We also can send a sticker.(But a message need)

This is stickers which we can use.

STKID correspond to sticker_id, STKPKGID correspond to sticker_package_id.

Below code is send a sticker to LINENotify.

import pylinenotify

TOKEN = 'YOUR_ACCESS_TOKEN'

pylinenotify.send_sticker_with_message(token=TOKEN, message='Hello World', sticker_package_id='1', sticker_id='1')

# same as pylinenotify.send_sticker(TOKEN, 'Hello World', 1, 1)

below screenshot is the result.

stickerサンプル

####For those who find it difficult to specify TOKEN as an argument one by one, I have also created our own classes

The following code creates a Notifer type object and executes the same operation as the above three codes at the same time.

import pylinenotify

TOKEN = 'YOUR_ACCESS_TOKEN'

notifer=pylinenotify.Notifer(TOKEN)

notifer.send_message('Hello World!')

notifer.send_photo_with_message('Hello Hatune Miku!','miku.jpg')

notifer.send_sticker_with_message('Hello World', 1, 1)

When creating such an object, you do not need to put access_token in the argument.

Install

$ pip install pylinenotify

Licence

MIT

Author

reud

About

Python+LINENotify more easily

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages