andrew-svirin/skype-client-php

PHP library for interact with Skype.

1.0.0 2019-09-05 15:14 UTC

This package is auto-updated.

Last update: 2024-10-29 06:18:29 UTC


README

Provides interface for communicate with Skype server using Skype Account. Can be used to some skype integrations. In Symfony 5 exists notifier module that can be extended by this library.

Troubleshooting

Before usage please login by web-browser first, because account can be blocked by the Skype server.

Installation for PHP 7.2+

$ composer require andrew-svirin/skype-client-php

License

andrew-svirin/skype-client-php is licensed under the MIT License, see the LICENSE file for details

Example

Include

 use AndrewSvirin\SkypeClient\SkypeClient;
 use AndrewSvirin\SkypeClient\Services\SessionManager;

Initialize Client:

      $sessionManager = new SessionManager(
         __PROTECTED_DIR__ . '/sessions',
         EnvUtil::getSecret()
      );
      $client = new SkypeClient($sessionManager);

Login and create session:

      $account = new Account($username, $password);
      $session = $client->login($account);

Send message:

      $conversation = new Conversation(__SKYPE_ID__, __SKYPE_LABEL__);
      $client->sendMessage($session, $conversation, 'Hi');

More usage methods you can find in tests/Unit/ClientTest.php file.