shout
roblox.shout
¶
Contains the Shout object, which represents a group's shout.
Shout
¶
Represents a Group Shout.
Attributes:
Name | Type | Description |
---|---|---|
_shared |
ClientSharedObject |
The shared object, which is passed to all objects this client generates. |
body |
str |
The text of the shout. |
created |
datetime |
When the shout was created. |
updated |
datetime |
When the shout was updated. |
poster |
PartialUser |
Who posted the shout. |
Source code in roblox/shout.py
class Shout:
"""
Represents a Group Shout.
Attributes:
_shared: The shared object, which is passed to all objects this client generates.
body: The text of the shout.
created: When the shout was created.
updated: When the shout was updated.
poster: Who posted the shout.
"""
def __init__(
self,
shared: ClientSharedObject,
data: dict
):
"""
Arguments:
shared: Shared object.
data: The data from the request.
"""
self._shared: ClientSharedObject = shared
self.body: str = data["body"]
self.created: datetime = parse(data["created"])
self.updated: datetime = parse(data["updated"])
self.poster: PartialUser = PartialUser(
shared=self._shared,
data=data["poster"]
)
def __repr__(self):
return f"<{self.__class__.__name__} created={self.created} updated={self.updated} body={self.body!r} " \
f"poster={self.poster!r}>"
__init__(self, shared: ClientSharedObject, data: dict)
special
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shared |
ClientSharedObject |
Shared object. |
required |
data |
dict |
The data from the request. |
required |
Source code in roblox/shout.py
def __init__(
self,
shared: ClientSharedObject,
data: dict
):
"""
Arguments:
shared: Shared object.
data: The data from the request.
"""
self._shared: ClientSharedObject = shared
self.body: str = data["body"]
self.created: datetime = parse(data["created"])
self.updated: datetime = parse(data["updated"])
self.poster: PartialUser = PartialUser(
shared=self._shared,
data=data["poster"]
)
__repr__(self)
special
¶
Source code in roblox/shout.py
def __repr__(self):
return f"<{self.__class__.__name__} created={self.created} updated={self.updated} body={self.body!r} " \
f"poster={self.poster!r}>"