dso_sns module
This module can send some message to SNS
- class dso_sns.LineNotify(token: str | None = None)
Bases:
objectThis can send Line Notify.
Important
Need to have your own token, https://notify-bot.line.me/en/
Important
Need configure your network DNS settings.
Useage:
import dso_sns TOKEN = <your tiken> l = dso_sns.LineNotify(TOKEN) data = l.make_data('Message') l.sned(data)
- make_data(msg: str, stickerPackageId: int | None = None, stickerId: int | None = None, imageFile: str | None = None, imageThumbnail: str | None = None, imageFullsize: str | None = None) dict
This can prepare your data
- Parameters:
msg (str) – The message you want to send, it’s necessarily.
stickerPackageId (int, optional) –
The sticker package ID.
Defaults to None.
stickerId (int, optional) –
The sticker ID.
Defaults to None.
imageFile (str, optional) –
The local image path.
Defaults to None.
imageThumbnail (str, optional) –
The HTTP image URL.
Defaults to None.
imageFullsize (str, optional) –
The HTTP image URL.
Defaults to None.
- Returns:
data
- Return type:
Tip
The sticker info is here https://developers.line.biz/en/docs/messaging-api/sticker-list/#specify-sticker-in-message-object
Note
If you specified imageThumbnail ,imageFullsize and imageFile, imageFile takes precedence.