2017 © Pedro Peláez
 

library zulip-php

PHP Zuilip Client

image

mrferos/zulip-php

PHP Zuilip Client

  • Wednesday, November 29, 2017
  • by mrferos
  • Repository
  • 3 Watchers
  • 2 Stars
  • 2,556 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Zulip PHP Client

I am working on a V2 of the client that is more up to date and is actually tested to work, please see the v2 branch for updates, (*1)

Have been playing around with Zulip and noticed there was no PHP client... So I made one!, (*2)

Installation

Using composer!, (*3)

composer require mrferos/zulip-php:^0.1.0

Usage:

Using the client is simple, instantiate it with the URL to your Zulip instance and pass the default authentication object (on a per request basis you can specify different authentication in case you need/want to send messages as different users per requests)., (*4)

Example:

<?php
require_once __DIR__ . '/vendor/autoload.php';

$client = new \Zulip\Client('http://localhost:9991');
$client->setDefaultAuthentication(new \Zulip\Authentication('feedback@zulip.com', '7Rp5bNRVz1dSuDz4HhANaxlpNDcYb6GQ'));
$client->sendMessage([
    'to' => 'Denmark',
    'content' => 'content',
    'type' => \Zulip\Request\MessageParameters::TYPE_STREAM,
    'subject' => 'subject'
]);

// or.. (this is what happens under the code if you pass an array)

$parameters = new \Zulip\Request\MessageParameters();
$parameters->setContent('Content of message');
$parameters->setTo('Denmark');
$parameters->setType(\Zulip\Request\MessageParameters::TYPE_STREAM);
$parameters->setSubject('This is the subject');

$client->sendMessage($parameters);

TODO:

  • [ ] Write tests
  • [ ] Implement the rest of the API
  • [ ] More documentation!

The Versions

29/11 2017

dev-master

9999999-dev

PHP Zuilip Client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andres Galindo

04/10 2015

dev-correcting_args

dev-correcting_args

PHP Zuilip Client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andres Galindo

29/09 2015

0.2.0

0.2.0.0

PHP Zuilip Client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andres Galindo

27/09 2015

0.1.0

0.1.0.0

PHP Zuilip Client

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andres Galindo