Models¶
Introduction¶
This page intorduce you a list of core models which is used in LINE API. The name of each models tell you what it is intuitively. In most cases, you don’t have to create this instances, but if you want to change line, I hope this documents wil help you to find what you want.
LineBase¶
-
class
line.
LineBase
¶ -
getRecentMessages
(count=1)¶ Get recent messages
Parameters: count – count of messages to get
-
sendImage
(path)¶ Send a image
Parameters: path – local path of image to send
-
sendImageWithURL
(url)¶ Send a image with given image url
Parameters: url – image url to send
-
sendMessage
(text)¶ Send a message
Parameters: text – text message to send
-
sendSticker
(stickerId='13', stickerPackageId='1', stickerVersion='100', stickerText='[null]')¶ Send a sticker
Parameters: - stickerId – id of sticker
- stickerPackageId – package id of sticker
- stickerVersion – version of sticker
- stickerText – text of sticker (default=’[null]’)
-
LineContct¶
-
class
line.
LineContact
(client, contact)¶ LineContact wrapper
- Attributes:
- name display name of contact statusMessage status message of contact
LineContact init
Parameters: - client – LineClient instance
- contact – Conatct instace
-
groups
¶ Groups that contact participates
-
profileImage
¶ Link for profile image
-
rooms
¶ Rooms that contact participates
LineRoom¶
-
class
line.
LineRoom
(client, room)¶ Chat room wrapper
- Attributes:
- contacts : Contact list of chat room
LineContact init
Parameters: - client – LineClient instance
- room – Room instace
-
getContactIds
()¶ Get contact ids of room
-
invite
(contact)¶ Invite into group
Parameters: contact – LineContact instance to invite
-
leave
()¶ Leave room
LineGroup¶
-
class
line.
LineGroup
(client, group=None, is_joined=True)¶ LineGroup wrapper
- Attributes:
- creator contact of group creator members list of contact of group members invitee list of contact of group invitee
>>> group = LineGroup(client, client.groups[0])
LineGroup init
Parameters: - client – LineClient instance
- group – Group instace
- is_joined – is a user joined or invited to a group
-
getMemberIds
()¶ Get member ids of group
-
leave
()¶ Leave group