https://github.com/webinvoke/client
WebInvoke client
https://github.com/webinvoke/client
guzwrap php webhook webhook-client
Last synced: about 1 year ago
JSON representation
WebInvoke client
- Host: GitHub
- URL: https://github.com/webinvoke/client
- Owner: webinvoke
- Created: 2021-02-06T00:16:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-06T01:05:42.000Z (over 5 years ago)
- Last Synced: 2025-02-14T19:52:02.049Z (over 1 year ago)
- Topics: guzwrap, php, webhook, webhook-client
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WebInvoke Client
Webinvoke client is a client that provided access to all functionalities provied by [Webinvoke Server](https://github.com/webinvoke/server).
This library uses [Guzwrap](https://github.com/ahmard/guzwrap) internally.
## Installation
Installation is made using [Composer](https://getcomposer.org)
```bash
composer require webinvoke/client
```
## Usage
Before running below code, [Webinvoke Server](https://github.com/webinvoke/server#usage) must be started on port **8999**.
```php
use Webinvoke\Client\Auth;
use Webinvoke\Client\Query;
use Webinvoke\Client\Request;
use Webinvoke\Client\Server;
require 'vendor/autoload.php';
$response = Request::create()
->server(Server::create('http://localhost:8999'))
->auth(Auth::create()->open())
->query(function (Query $query){
$query->fetchAll();
$query->limit(5);
})
->execute();
var_dump($response->getPayload());
```