2017 © Pedro Peláez
 

library mainframe-bot-api

API to communicate with the mainframe bot api easily

image

aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  • Friday, November 17, 2017
  • by aubruz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 129 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 27 Versions
  • 0 % Grown

The README.md

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

mainframe-bot-api

A package to use the mainframe bot api easily, (*2)

You can find the documentation of the mainframe API here., (*3)

If you find any bug or problem feel free to fork the project and make a PR. Or you can write me an email to dev@jaquier.co., (*4)

How to install it

With composer: composer require aubruz/mainframe-bot-api Add use Aubruz\Mainframe\MainframeClient; in your project., (*5)

How to use it

Create client

$mainframeClient = new MainframeClient($botSecret);

You can specify the API url if you want to use another one. The default one is "https://api.mainframe.com/bots/v1/"., (*6)

$mainframeClient = new MainframeClient($botSecret, 'https://api-staging.mainframe.com/bots/v1/');

Send message

$mainframeClient->sendMessage($conversationID, 'Hello World!!');

Setup subscription

$mainframeClient->setupSubscription($subscriptionToken, $label);

Edit subscription

$mainframeClient->editSubscription($subscriptionToken, $label);

Delete subscription

$mainframeClient->deleteSubscription($conversationID, $subscriptionID);

You can add an optional message to post to the conversation (to explain the reason for removal), (*7)

$mainframeClient->deleteSubscription($conversationID, $subscriptionID, $message);

Response

The mainframe-bot-api package uses guzzlehttp/guzzle to perform the requests. Each call returns a response object from that library. You can find the documentation here., (*8)

$response = mainframeClient->setupSubscription($subscriptionToken, $label);
$response = json_decode($response->getBody());
if($response->getStatusCode() === 200 && $response->success){
    // Do something
}

The Versions

17/11 2017

dev-master

9999999-dev https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

11/09 2017

v1.0.7

1.0.7.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

11/09 2017

v1.0.6

1.0.6.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

08/09 2017

v1.0.5

1.0.5.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

08/09 2017

v1.0.4

1.0.4.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

07/09 2017

v1.0.3

1.0.3.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

07/09 2017

v1.0.2

1.0.2.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

07/09 2017

v1.0.1

1.0.1.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

06/09 2017

v1.0.0

1.0.0.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

04/09 2017

v0.5.8

0.5.8.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

04/09 2017

v0.5.7

0.5.7.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

04/09 2017

v0.5.6

0.5.6.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

04/09 2017

v0.5.5

0.5.5.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

01/09 2017

v0.5.4

0.5.4.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

01/09 2017

v0.5.3

0.5.3.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

01/09 2017

v0.5.2

0.5.2.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

31/08 2017

v0.5.1

0.5.1.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

29/08 2017

v0.5.0

0.5.0.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

24/08 2017

v0.4.3

0.4.3.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

24/08 2017

v0.4.2

0.4.2.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

24/08 2017

v0.4.1

0.4.1.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

24/08 2017

v0.4.0

0.4.0.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

24/08 2017

v0.3.0

0.3.0.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

23/08 2017

v0.2.1

0.2.1.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

23/08 2017

v0.2.0

0.2.0.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

22/08 2017

v0.1.1

0.1.1.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe

22/08 2017

v0.1

0.1.0.0 https://github.com/aubruz/mainframe-bot-api

API to communicate with the mainframe bot api easily

  Sources   Download

MIT

The Requires

 

by Aubry

api bot mainframe