Download the PHP package logotel/logobot-php-integration without Composer
On this page you can find all versions of the php package logotel/logobot-php-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download logotel/logobot-php-integration
More information about logotel/logobot-php-integration
Files in logotel/logobot-php-integration
Package logobot-php-integration
Short Description A package to integrate with LogoBot
License MIT
Informations about the package logobot-php-integration
Logobot PHP integration
This package aim to provide the integration with Logobot
Installation
Install via composer:
Generating JWT
Generate your JWT with:
The key can be retrieved by a file path:
Super user
The property (bool) can set if the user has high privilege. The privileges will be managed by the server application.
Token expiration
The token default lifetime is 24 hours. You can edit it with ->setExpiration(int $expiration)
. The expiration time is in seconds (deafult 60 60 24)
User payload
Parameter | Type | Description |
---|---|---|
String | The email address of the user | |
identifier | String | The user identifier |
license | String | The bot license |
permissions | Array(String) | The user's permissions |
is_super_user | Bool | If the user is super user |
Authenticate without JWT
In case of JWT too big (>2kb) you have to use /authenticate
endpoint.
Before proceeding create a JWT as described here
The key will be then used instead of jwt
Uploading text (with link)
If you want to change the endpoint base url you can change it by:
You can also set a custom http client
is_searchable
and is_generative
are true
by default
Bulk importer
The bulk importer functionality will take care of processing multiple file at once. The file uploaded must by a zip file, containing:
- n files in pdf or txt format
- a json file named
details.json
with this structure, with one entry for each file:
The number of the entries in the array must be total files in zip - 1
(the json file).
Usage
If you want to change the endpoint base url you can change it by:
You can also set a custom http client
Delete document
If you want to change the endpoint base url you can change it by:
You can also set a custom http client
Search engine
Search the most relevant documents based on search query.
$jwt
is the jwt token generated using Generating JWT
$query
is the search query
$limit
is the maximum amount of documents to retrieve
$filters
is an array of available filters. At the moment are supported:
Filter key | Type | Description | Example |
---|---|---|---|
date_from | Date | Filter documents based on creation date | 2024-06-24 |
The ouput will be
icon
possible values are:
- file-pdf
- file-word
- file-powerpoint
- file-excel
- file-alt
- file
If you want to change the endpoint base url you can change it by:
You can also set a custom http client
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
History
Version 1.00 (2024-02-27) - first commit
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Garavaglia Giacomo
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of logobot-php-integration with dependencies
firebase/php-jwt Version ^6.10 || ^5.5.1
guzzlehttp/guzzle Version ^7.0 || ^6.0