Download the PHP package strimeapp/slackify without Composer
On this page you can find all versions of the php package strimeapp/slackify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download strimeapp/slackify
More information about strimeapp/slackify
Files in strimeapp/slackify
Package slackify
Short Description Slackify, an Object Oriented library to communicate with Slack API
License MIT
Informations about the package slackify
Slackify
Slackify is a PHP bundle which lets you communicate with Slack API.
It has been initially developed for Strime.
Installation
The recommended way to install Slackify is through Composer.
Webhooks
Slackify allows you to easily send messages to webhooks.
The icon
parameter may either be an URL to an image, or an emoji code (:taco: for instance).
The link_text
parameter is the text that will be clickable, if you set the link
parameter.
Sending attachments
If you want to send attachments allong to your message, you can do it like this, before sending the message:
- fallback: A plain-text summary of the attachment. This text will be used in clients that don't show formatted text (eg. IRC, mobile notifications) and should not contain any markup.
- color: Like traffic signals, color-coding messages can quickly communicate intent and help separate them from the flow of other messages in the timeline. An optional value that can either be one of
good
,warning
,danger
, or any hex color code (eg.#439FE0
). This value is used to color the border along the left side of the message attachment. - pretext: This is optional text that appears above the message attachment block.
- author: The author parameters will display a small section at the top of a message attachment that can contain the following fields:
- author_name: Small text used to display the author's name.
- author_link: A valid URL that will hyperlink the
author_name
text mentioned above. Will only work ifauthor_name
is present. - author_icon: A valid URL that displays a small 16x16px image to the left of the
author_name
text. Will only work ifauthor_name
is present.
- title: The
title
is displayed as larger, bold text near the top of a message attachment. By passing a valid URL in thetitle_link
parameter (optional), the title text will be hyperlinked. - fields:
- title: Shown as a bold heading above the value text. It cannot contain markup and will be escaped for you.
- value: The text value of the field. It may contain standard message markup and must be escaped as normal. May be multi-line.
- short: An optional flag indicating whether the value is short enough to be displayed side-by-side with other values.
- image_url: A valid URL to an image file that will be displayed inside a message attachment. We currently support the following formats: GIF, JPEG, PNG, and BMP. Large images will be resized to a maximum width of 400px or a maximum height of 500px, while still maintaining the original aspect ratio.
- thumb_url: A valid URL to an image file that will be displayed as a thumbnail on the right side of a message attachment. We currently support the following formats: GIF, JPEG, PNG, and BMP. The thumbnail's longest dimension will be scaled down to 75px while maintaining the aspect ratio of the image. The filesize of the image must also be less than 500 KB. For best results, please use images that are already 75px by 75px.
- footer: Add some brief text to help contextualize and identify an attachment. Limited to 300 characters, and may be truncated further when displayed to users in environments with limited screen real estate.
- footer_icon: To render a small icon beside your footer text, provide a publicly accessible URL string in the
footer_icon
field. You must also provide afooter
for the field to be recognized. We'll render what you provide at 16px by 16px. It's best to use an image that is similarly sized. - ts: By providing the ts field with an integer value in "epoch time", the attachment will display an additional timestamp value as part of the attachment's footer.
API
Slackify also allows you to easily send requests to the API.
In order to instantiate a connection to the API, you will need a token. You can generate test tokens here.
Each section of the API documentation has its own class with the corresponding methods.
API
The following links will give you more details about the methods, specially about the variables and the error codes:
Auth
The following links will give you more details about the methods:
Bots
The following links will give you more details about the methods:
The following links will give you more details about the methods:
- archive
- create
- history
- info
- invite
- join
- kick
- leave
- list
- mark
- rename
- replies
- setPurpose
- setTopic
- unarchive
Chats
The following links will give you more details about the methods:
Dnd
The following links will give you more details about the methods:
Emoji
The following links will give you more details about the methods:
FilesComments
The following links will give you more details about the methods:
Files
The following links will give you more details about the methods:
Groups
The following links will give you more details about the methods:
- archive
- close
- create
- createChild
- history
- info
- invite
- kick
- leave
- list
- mark
- open
- rename
- replies
- setPurpose
- setTopic
- unarchive
Im
The following links will give you more details about the methods:
Mpim
The following links will give you more details about the methods:
Oauth
The following links will give you more details about the methods:
Pin
The following links will give you more details about the methods:
Reactions
The following links will give you more details about the methods:
Reminders
The following links will give you more details about the methods:
Rtm
The following links will give you more details about the methods:
Search
The following links will give you more details about the methods:
Stars
The following links will give you more details about the methods:
Team
The following links will give you more details about the methods:
UserGroups
The following links will give you more details about the methods:
Users
The following links will give you more details about the methods:
UsersProfile
The following links will give you more details about the methods: