Slack Types¶
This package defines every type that Slackly defines. They are defined in a variety of sub modules for ease of discoverability and collaboration, but all types should be exposed in this top level package.
Base Classes and Utilities¶
-
class
slackly.schema.types._base.SlackType(kwargs)¶ The base SlackType. It handles the default creation of attributes from keyword arguments
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types._base.HasIDMixin¶ This mixin adds the behavior of allowing the object to be instantiated from an ID. Also updates the __repr__ to include the id in the repr
Types¶
-
class
slackly.schema.types._base.HasIDMixin This mixin adds the behavior of allowing the object to be instantiated from an ID. Also updates the __repr__ to include the id in the repr
-
classmethod
Id(id)¶ Class method to create the class from an ID
Parameters: id – A slack ID, e.g. T1NASNDSP Returns: A class instance of whatever class this is mixed in to
-
__weakref__¶ list of weak references to the object (if defined)
-
classmethod
-
class
slackly.schema.types._base.SlackType(kwargs) The base SlackType. It handles the default creation of attributes from keyword arguments
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None -
__init__(kwargs)¶ Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
__weakref__¶ list of weak references to the object (if defined)
-
-
slackly.schema.types.basic.Bool(value)¶ A function to convert a value into a Boolean
Parameters: value – any value that can be passed to bool Returns: a boolor None
-
slackly.schema.types.basic.Epoch(value)¶ A Function to take an epoch and return a datetime.datetime object. Also defaults that 0 is None
Parameters: value – An epoch Returns: a datetime.datetimeor None
-
slackly.schema.types.basic.Integer(value)¶ A function to convert a value into a string
Parameters: value – any intable value Returns: a intor None
-
class
slackly.schema.types.basic.List(slack_type)¶ A collection. It gets instantiated with a type factory, and when it’s called, it iterates through its argument and returns a
listof whatever type it was instantiated with.Parameters: slack_type – A SlackType-
__init__(slack_type)¶ Parameters: slack_type – A SlackType
-
-
class
slackly.schema.types.basic.SlackTimestamp(timestamp)¶ A type to wrap slack timestamps. These represent actual times, but also can be considered uuids in the context of a team.
Parameters: timestamp – A strrepresenting a timestamp-
dt¶ Returns the
SlackTimeStampas adatetime.datetimeReturns: A datetime.datetime
-
-
slackly.schema.types.basic.String(value)¶ A function to convert a value into a string
Parameters: value – any stringifyable value Returns: a stror None
-
class
slackly.schema.types.basic.Timestamp(kwargs)¶ An actual timestamp (not necessarily a uuid
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.message.Message(kwargs)¶ A Message
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.message.PostedMeMessage(kwargs)¶ A posted meMessage (message posted as a user)
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.message.PostedMessage(kwargs)¶ A Posted Message
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.message.UpdatedMessage(kwargs)¶ An updated message
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.channel.Channel(kwargs)¶ A Channel
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.channel.ChannelPurpose(kwargs)¶ A Channel Purpose
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.channel.ChannelTopic(kwargs)¶ A Channel Topic
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.channel.ChannelType(kwargs)¶ A Channel Type
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.channel.CreatedChannel(kwargs)¶ A Created Channel
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.channel.IM(kwargs)¶ An Single Person Direct Message Channel
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None
-
class
slackly.schema.types.channel.MPIM(kwargs)¶ An Multi-Person Direct Message Channel
Parameters: kwargs – An arbitrary dictionary of keyword arguments Returns: None