|
1 |
| -# Recast.AI - SDK PHP |
2 |
| - |
3 |
| -[logo]: https://github.com/RecastAI/SDK-PHP/blob/develop/misc/logo-inline.png "Recast.AI" |
| 1 | +[logo]: https://cdn.recast.ai/brand/recast-ai-logo-inline.png "Recast.AI" |
4 | 2 |
|
5 | 3 | ![alt text][logo]
|
6 | 4 |
|
| 5 | +# Recast.AI - SDK PHP |
7 | 6 | Recast.AI official SDK in PHP
|
8 | 7 |
|
9 | 8 | ## Synospis
|
10 | 9 |
|
11 | 10 | This module is a wrapper around the [Recast.AI](https://recast.ai) API, and allows you to:
|
12 |
| -* [build a bot](https://github.com/RecastAI/SDK-PHP/wiki/Build-your-bot) |
13 |
| -* [analyze your text](https://github.com/RecastAI/SDK-PHP/wiki/Analyse-text) |
| 11 | +* [Analyse your text](https://github.com/RecastAI/SDK-PHP/wiki/01---Analyse-text) |
| 12 | +* [Manage your conversation](https://github.com/RecastAI/SDK-PHP/wiki/02---Manage-conversation) |
| 13 | +* [Receive and send messages](https://github.com/RecastAI/SDK-PHP/wiki/03--Receive-and-send-messages) |
| 14 | + |
14 | 15 |
|
15 | 16 | ## Installation
|
16 | 17 |
|
| 18 | +Install the package using npm, as shown below: |
17 | 19 | ```bash
|
18 | 20 | composer require recastai/sdk-php
|
19 | 21 | ```
|
20 | 22 |
|
21 |
| -## Documentation |
| 23 | +You can now use the sdk in your code. |
22 | 24 |
|
23 |
| -You can find the full documentation [here](https://github.com/RecastAI/SDK-PHP/wiki). |
| 25 | +Using the entire SDK: |
| 26 | +```php |
| 27 | +<?php |
| 28 | +require_once __DIR__ . '/vendor/autoload.php'; |
24 | 29 |
|
25 |
| -## Specs |
| 30 | +use RecastAI\Client; |
26 | 31 |
|
27 |
| -This module contains 5 classes, as follows: |
| 32 | +$client = new Client('YOUR_TOKEN'); |
| 33 | +``` |
| 34 | + |
| 35 | +Extracting one single API: |
| 36 | +```php |
| 37 | +<?php |
| 38 | +require_once __DIR__ . '/vendor/autoload.php'; |
28 | 39 |
|
29 |
| -* [Client](https://github.com/RecastAI/SDK-PHP/wiki/Class-Client) is the client allowing you to make requests. |
30 |
| -* [Conversation](https://github.com/RecastAI/SDK-PHP/wiki/Class-Conversation) wraps the response from a call to [Recast.AI](https://recast.ai) API with the textConverse Client method. |
31 |
| -* [Response](https://github.com/RecastAI/SDK-PHP/wiki/Class-Response) wraps the response from a call to [Recast.AI](https://recast.ai) API with the textRequest or fileRequest Client methods. |
32 |
| -* [Entity](https://github.com/RecastAI/SDK-PHP/wiki/Class-Entity) represents an entity extracted from an input. |
| 40 | +use RecastAI\Client; |
| 41 | + |
| 42 | +$request = Client::Request('YOUR_TOKEN'); |
| 43 | +$connect = Client::Connect('YOUR_TOKEN'); |
| 44 | +``` |
33 | 45 |
|
34 | 46 | ## More
|
35 | 47 |
|
36 | 48 | You can view the whole API reference at [man.recast.ai](https://man.recast.ai).
|
37 | 49 |
|
38 | 50 | ## Author
|
39 | 51 |
|
40 |
| -Bruno Gantelmi, bruno.gantelmi@recast.ai |
| 52 | +Marian André, marian.andre@recast.ai |
41 | 53 |
|
42 | 54 | You can follow us on Twitter at [@recastai](https://twitter.com/recastai) for updates and releases.
|
43 | 55 |
|
44 | 56 | ## License
|
45 | 57 |
|
46 |
| -Copyright (c) [2016] [Recast.AI](https://recast.ai) |
| 58 | +Copyright (c) [2017] [Recast.AI](https://recast.ai) |
47 | 59 |
|
48 | 60 | Permission is hereby granted, free of charge, to any person obtaining a copy
|
49 | 61 | of this software and associated documentation files (the "Software"), to deal
|
|
0 commit comments