Download the PHP package laravel-notification-channels/hipchat without Composer
On this page you can find all versions of the php package laravel-notification-channels/hipchat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel-notification-channels/hipchat
More information about laravel-notification-channels/hipchat
Files in laravel-notification-channels/hipchat
Package hipchat
Short Description HipChat Notifications Channel for Laravel
License MIT
Homepage https://github.com/laravel-notification-channels/hipchat
Informations about the package hipchat
HipChat Notifications Channel for Laravel
This package makes it easy to send HipChat notifications with Laravel.
Channel Deprecated
Hipchat was discontinued in early 2019. As such, this channel will no longer receive updates and is being deprecated.
Contents
- Installation
- Setting up the HipChat Service
- Usage
- Sending a simple room notification
- Sending a room notification with a card
- Sharing a file in a HipChat room
- Available methods
- Testing
- Security
- Changelog
- Contributing
- Credits
- License
Installation
You can install the package via composer:
If you're using Laravel < 5.5 or if you have package auto-discovery turned off you have to manually register the service provider:
Setting up the HipChat service
Add your HipChat Account Token and optionally the default room and Hipchat API server's base url to your config/services.php
:
Usage
Sending a simple room notification
_Note: In order to be able to send room notifications you would need an auth token (both personal and room tokens will work) with the send_notification scope._
Sending a room notification with a card
Read more about HipChat notification cards here.
Sharing a file in a HipChat room
_Note: In order to be able to share files you would need an auth token (i.e. personal token) with the send_message scope. You can create such token by visiting HipChat -> Account Setting -> API Access._
In majority of cases all you need is just a path to an exisiting file you want to share
You can optionally send a text message along the way
If you need more control and/or you're creating the content of the file on the fly
Available methods
HipChatMessage
create()
: Creates a newHipChatMessage
instance.room()
: Sets the id or name of the HipChat room to send the notification to.from()
: Sets the optional label to be shown in addition to the sender's name.content()
: Sets the content of the notification message.text()
: Sets the format to plain text and optionally the content.html()
: Sets the format to html and optionally the content. Allowed HTML tags: a, b, i, strong, em, br, img, pre, code, lists, tables.color()
: Sets the color of the message. SeeMessageColors
for allowec values.notify()
: Specifies if a message should trigger a user notification in a Hipchat client.info()
: Sets notification level toinfo
and color toMessageColors::GRAY
.success()
: Sets notification level tosuccess
and color toMessageColors::GREEN
.error()
: Sets notification level toinfo
and color toMessageColors::RED
.
Card
create()
: Creates a newCard
instance.title()
: Sets the title of the card.id()
: Sets the id of the card.style()
: Sets the style of the card. SeeCardStyles
for allowed values.text()
: Sets the format to plain text and optionally the content.html()
: Sets the format to html and optionally the content.cardFormat()
: Sets the format of the card. SeeCardFormats
for allowed values.url()
: Sets the url of the card.thumbnail()
: Sets the thumbnail of the card.activity()
: Sets the activity info of the card.icon()
: Sets the icon of the card.addAttribute()
: Adds aCardAttribute
to the card.
CardAttribute
create()
: Creates a newCardAttribute
instance.value()
: Sets the textual value of the attribute.label()
: Sets the label of the attribute.url()
: Sets the url of the attribute.style()
: Sets the style of the attribute. SeeCardAttributeStyles
for allowed values.icon()
: Sets the icon of the attribute.
HipChatFile
create()
: Creates a newHipChatFile
instance.room()
: Sets the id or name of the HipChat room to share the file in.path()
: Sets thefileContent
to the resource of the existing file and tries to detect and set thefileName
andfileType
if they weren't explicitely set.fileName
: Sets the name of the file.fileContent
: Explicitely sets the content of the file. It can be a string, stream or a file resource. If a resource was passed it tries to detect and set thefileType
if it wasn't explicitely set.fileType
: Explicitely sets the content (mime) type of the file.text()
: Sets a text message to be sent along with the file.
Testing
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- Peter Matseykanets
- All Contributors
Special thanks to Jerry Price for his help.
License
The MIT License (MIT). Please see License File for more information.
All versions of hipchat with dependencies
guzzlehttp/guzzle Version ^6.2
illuminate/queue Version ~5.1
illuminate/notifications Version ~5.3
illuminate/support Version ~5.1