Coder Social home page Coder Social logo

websvcpt / php-rocketchat-webhooks Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 5 KB

Send requests to Rocket Chat Incomming Webhooks

Home Page: https://websvcpt.github.io/php-rocketchat-webhooks/

License: MIT License

PHP 100.00%
php-rocketchat-webhooks php rocketchat webhook integration

php-rocketchat-webhooks's Introduction

php-rocketchat-webhooks

Send requests to Rocket Chat Incoming Webhooks

Tested with Rocket Chat server v 0.63.0

Install

composer require websvc/php-rocketchat-webhooks 1.0.0

Rocket Chat setup

Create a new Incomming Hook in Administration and retrieve the URL with token.

Usage

Simple message:

$client = new \PhpRocketChatWebhooks\Client('https://rocket.chat/hooks/TOKEN', "Optional-Username");
$client->sendRequest("Hello World!");

Message with attachment:

$client = new \PhpRocketChatWebhooks\Client('https://rocket.chat/hooks/TOKEN', "Optional-Username");
$client->sendRequest("Hello World!", [
                    'title' => "Google homepage",
                    'title_link' => "https://google.com",
                    'text' => "text text text text text text text",
                    'image_url' => "https://www.google.pt/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
                ]);

Buy me a cofee

If You'd like to thank me you can buy me a cofee. Cofee is never too much :)

https://www.buymeacoffee.com/websvc

php-rocketchat-webhooks's People

Contributors

websvcpt avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

l3dlp-sandbox

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.