2017 © Pedro Peláez
 

library esputnik_client_l5

eSputnik API library

image

vis/esputnik_client_l5

eSputnik API library

  • Wednesday, August 2, 2017
  • by KGluschenko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 33 % Grown

The README.md

eSputnik API library, (*1)

Execute, (*2)

    composer require "vis/esputnik_client_l5":"1.*"

Add eSputnikClientServiceProvider to ServiceProviders in config/app.php, (*3)

   Vis\eSputnikClient\eSputnikClientServiceProvider::class,

Publish config and define your login\password in it, (*4)

    php artisan vendor:publish --tag=esputnik-client-config --force

Usage, (*5)

    use Vis\eSputnikClient\eSputnikClient;

Methods example, (*6)

    $client = new eSputnikClient();

    $result  = $client->getVersion();

Send identical email to every recipient with prepared template as %TEMPLATE.variable_name%, (*7)

    $letterTemplate = 'email_send';
    $recipient = ['email@email.com'];
    $params    = ['name' => 'k.glushchenko', 'message' => 'test_letter'];

    $result  = $client->sendPreparedMessage($letterTemplate, $recipient, $params);

Send identical sms to every recipient with prepared template Params in template are defined as %TEMPLATE.variable_name%, (*8)

    $letterTemplate = 'sms_send';
    $recipient = ['+38(000)-000-00-00'];
    $params    = ['name' => 'k.glushchenko', 'message' => 'test_letter'];

    $result  = $client->sendPreparedMessage($letterTemplate, $recipient, $params, false);

Send parametrized email for every recipient with prepared template. Params in template are defined as $!data.get('variable_name'), (*9)


$letterTemplate = 'email_smartsend'; $recipient = ['email1@email.com', 'email2@email.com']; $params = [ ['name' => 'name_for_email1', 'message' => 'message_for_email1'], ['name' => 'name_for_email2', 'message' => 'message_for_email2'] ]; $result = $client->sendExtendedPreparedMessage($letterTemplate, $recipient, $params);

Send parametrized sms for every recipient with prepared template. Params in template are defined as $!data.get('variable_name'), (*10)


$letterTemplate = 'sms_smartsend'; $recipient = ['+38(000)-000-000-00', '+38(000)-000-00-01']; $params = [ ['name' => 'name_for_00', 'message' => 'message_for_00'], ['name' => 'name_for_01', 'message' => 'message_for_01'] ]; $result = $client->sendExtendedPreparedMessage($letterTemplate, $recipient, $params, false);

Check message status by message id, (*11)

    $result = $client->getInstantMessageStatus($id);

Send instant email, (*12)

    $from       = '"organization" <your@account.com>';
    $subject    = 'subject';
    $htmlText   = '<html><body>

test!

</body></html>'; $emails = ['email@email.com']; $result = $client->sendEmail($from, $subject, $htmlText,$emails);

Check email status by message hash, (*13)

    $result = $client->getInstantEmailStatus($hash);

Send instant email, (*14)

     $from   = 'your_sms_sender';
     $text   = 'test';
     $phones = ["+38(000)-000-00-00"];

     $result  = $client->sendSMS($from, $text, $phones);

Check sms status by message hash, (*15)

    $result = $client->getInstantSmsStatus($hash);

The Versions

02/08 2017

dev-master

9999999-dev

eSputnik API library

  Sources   Download

MIT

The Requires

 

by K.Gluschenko

07/05 2017

1.1.2

1.1.2.0

eSputnik API library

  Sources   Download

MIT

The Requires

 

by K.Gluschenko

14/04 2017

1.1.1

1.1.1.0

eSputnik API library

  Sources   Download

MIT

The Requires

 

by K.Gluschenko

30/03 2017

1.1

1.1.0.0

eSputnik API library

  Sources   Download

The Requires

 

by K.Gluschenko

27/03 2017

1.0

1.0.0.0

eSputnik API library

  Sources   Download

The Requires

 

by K.Gluschenko