gitter¶
Gitter.im Web-API Bindings
Classes
|
AioHTTP based implementation of GitterAPI |
|
Sans-IO Base Class for Gitter API |
|
Gitter User Mention |
|
Gitter Chat Message |
|
Gitter Chat Room |
|
Gitter User |
Documentation
-
class
bioconda_utils.gitter.
AioGitterAPI
(session, *args, **kwargs)[source]¶ AioHTTP based implementation of GitterAPI
-
class
bioconda_utils.gitter.
GitterAPI
(token)[source]¶ Sans-IO Base Class for Gitter API
Methods
list_rooms
([name])Get list of current user’s rooms
get_room
(uri)Get a room using its URI
join_room
(user, room)Add user to a room
leave_room
(user, room)Remove user from room
edit_room
(room[, topic, tags, noindex])Set topic, tags or noindex for room
list_unread_items
(user, room)Get Ids for unread items of user in room
mark_as_read
(user, room, ids)Mark chat messages listed in ids as read
get_message
(room, msgid)Get a single message by its id
send_message
(room, text, *args)Send a new message
edit_message
(room, message, text)Edit a message
Get list of current user’s groups
get_user
()Get current user
iter_chat
(room)Listen to chat messages
Details
-
async
edit_room
(room, topic=None, tags=None, noindex=None)[source]¶ Set topic, tags or noindex for room
- Return type
-
iter_chat
(room)[source]¶ Listen to chat messages
- Parameters
room (
Room
) – Room to listen in. Uselist_rooms
to findRoom
.- Return type
- Returns
async iterator over chat messages
-
async
list_rooms
(name=None)[source]¶ Get list of current user’s rooms
The list is filtered to match provided arguments.
-
async
-
class
bioconda_utils.gitter.
Mention
(screenName: str, userId: Optional[str] = None, userIds: Optional[List[str]] = None)[source]¶ Gitter User Mention
Create new instance of Mention(screenName, userId, userIds)
-
property
screenName
¶ User Name
-
property
userId
¶ User ID
-
property
userIds
¶ User IDs
-
property
-
class
bioconda_utils.gitter.
Message
(id: str, text: str, html: str, sent: str, fromUser: bioconda_utils.gitter.User, unread: bool, readBy: int, urls: List[str], mentions: List[bioconda_utils.gitter.Mention], issues: List[str], meta: str, v: str, gv: Optional[str] = None, editedAt: Optional[str] = None)[source]¶ Gitter Chat Message
Create new instance of Message(id, text, html, sent, fromUser, unread, readBy, urls, mentions, issues, meta, v, gv, editedAt)
-
property
editedAt
¶ Edit timestamp (ISO)
-
property
fromUser
¶ User by whom message was sent
-
property
gv
¶ Gravatar Version (used to force cache flushing)
-
property
html
¶ Message content (HTML)
-
property
id
¶ Message ID
-
property
issues
¶ Github #ISSUE references in message
-
property
mentions
¶ @mentions in message
-
property
meta
¶ (Unused)
-
property
readBy
¶ Number of users who read message
-
property
sent
¶ Posting timestamp (ISO)
-
property
text
¶ Message content (markdown)
-
property
unread
¶ Flag indicating whether we have read this
-
property
urls
¶ URLs present in message
-
property
v
¶ Version
-
property
-
class
bioconda_utils.gitter.
Room
(id: str, name: str, topic: str, userCount: int, mentions: List[str], lurk: bool, url: str, githubType: str, tags: List[str], unreadItems: int, avatarUrl: str, roomMember: str, groupId: str, public: str, lastAccessTime: Optional[str] = None, favourite: bool = False, oneToOne: Optional[bool] = None, user: Optional[bioconda_utils.gitter.User] = None, uri: Optional[str] = None, security: Optional[str] = None, noindex: Optional[str] = None, group: Optional[str] = None, v: Optional[str] = None)[source]¶ Gitter Chat Room
Create new instance of Room(id, name, topic, userCount, mentions, lurk, url, githubType, tags, unreadItems, avatarUrl, roomMember, groupId, public, lastAccessTime, favourite, oneToOne, user, uri, security, noindex, group, v)
-
property
avatarUrl
¶ Gravatar URL
-
property
favourite
¶ Flag marking this room as favorite
-
property
githubType
¶ Type of room (
ORG
,REPO
,ONETOONE
,ORG_CHANNEL
,REPO_CHANNEL
,USER_CHANNEL
)
-
property
group
¶ Unknown
-
property
groupId
¶ unknown
-
property
id
¶ Room ID
-
property
lastAccessTime
¶ Last time (ISO) room was accessed
-
property
lurk
¶ Flag marking this room as silenced (no notifications)
-
property
mentions
¶ Number of unread mentions of current user
-
property
name
¶ Room Name (e.g.
bioconda/Lobby
)
-
property
noindex
¶ unknown
-
property
oneToOne
¶ Flag marking personal chats
-
property
public
¶ unknown
-
property
roomMember
¶ unknown
-
property
security
¶ Unknown
List of tags attached to room
-
property
topic
¶ Room Topic
-
property
unreadItems
¶ Number of unread messages for current user
-
property
uri
¶ Room URI
-
property
url
¶ URL to this room for browser
-
property
user
¶ User if one-to-one
-
property
userCount
¶ List of users joined in room
-
property
v
¶ Version
-
property
-
class
bioconda_utils.gitter.
User
(id: str, username: str, displayName: str, url: str, avatarUrl: str, avatarUrlSmall: str, avatarUrlMedium: str, v: str, gv: str, providers: Optional[List[str]] = None)[source]¶ Gitter User
Create new instance of User(id, username, displayName, url, avatarUrl, avatarUrlSmall, avatarUrlMedium, v, gv, providers)
-
property
avatarUrl
¶ Avatar URL
-
property
avatarUrlMedium
¶ Medium avatar URL
-
property
avatarUrlSmall
¶ Small avatar URL
-
property
displayName
¶ Gitter displayname (real name)
-
property
gv
¶ Gravatar Version (used to force cache flushing)
-
property
id
¶ User ID
-
property
providers
¶ List of OAUTH providers for user
-
property
url
¶ Profile URL (relative)
-
property
username
¶ Gitter username (OAUTH - Github/Gitlab)
-
property
v
¶ Version
-
property