Skip to content

nikolaimoiseev01/yclients-laravel-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Stable Version Latest Unstable Version Total Downloads License

Laravel YClients SDK

Install

$ composer require googlogmob/yclients-laravel-sdk

Publish config file

$ php artisan vendor:publish --tag=yclients-laravel-sdk

Laravel 5.5+

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

...
 googlogmob\YClientsSDK\YClientsSDKServiceProvider::class
...

Set configs\yclients-laravel-sdk

'accounts' => [
     'default' => [
     // Login and password are required to receive USER TOKEN. 
     // If you have them you do not have to fill in these fields
     'login' => '',
     'password' => '',
      // Used in all requests and is mandatory
     'bearer_token' => '',
     'user_token' => ''
   ],
]

Obtain TOKENS

Bearer token can be recived from yclients support.

To obtain user token set login, password and bearer token in configs and run

    use googlogmob\YClientsSDK\Facades\YClientsSDK;
    ...
    YClientsSDK::authorization()->get() // return USER TOKEN

Supported API methods

  • Authorization
  • Clients
  • Companies
  • Goods
  • Records
  • Salons
  • Services
  • ServiceCategory
  • Staff
  • Visits
    • VisitDetails

Examples

Clients

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$clients = YClientsSDK::clients()->setCompany($companyId)->get();

Companies

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$companies = YClientsSDK::companies()->setSalonId($salonId)->get();

Goods

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$goods = YClientsSDK::goods()->setCompany($companyId)->get();

Records

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$records = YClientsSDK::records()->setCompany($companyId)->setChangedAfter(Carbon::today())->get();

Groups

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$salons = YClientsSDK::groups()->get();

ServiceCategory

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$serviceCategory = YClientsSDK::serviceCategory()->setCompany($companyId)->get();

Staff

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$staff = YClientsSDK::staff()->setCompany($companyId)->get();

Visits

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$visits = YClientsSDK::visits()->setVisitId($visitId)->get();

VisitDetails

use googlogmob\YClientsSDK\Facades\YClientsSDK;
...
$visitDetails = YClientsSDK::visitDetails()->setVisitId($visitId)->setSalonId($salonId)->setRecordId($recordId)->get();

License

The MIT License (MIT). Please see License File for more information.

Package updates

https://packagist.org/packages/googlogmob/yclients-laravel-sdk

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages