2017 © Pedro Peláez
 

library vk-client

PHP client for Vk.com API

image

atehnix/vk-client

PHP client for Vk.com API

  • Wednesday, October 4, 2017
  • by atehnix
  • Repository
  • 6 Watchers
  • 43 Stars
  • 4,614 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 13 Forks
  • 0 Open issues
  • 6 Versions
  • 28 % Grown

The README.md

PHP client for Vk.com API

GitHub license Packagist Version Packagist Stats, (*1)

Installation

You can get library and all of it dependencies through composer, (*2)

composer require atehnix/vk-client, (*3)

Usage

Simple example

    $api = new Client;

    $response = $api->request('wall.get', ['owner_id' => 1]);

Use Request class

    $api = new Client;

    $request = new Request('wall.get', ['owner_id' => 1]);
    $response = $api->send($request);

Use ExecuteRequest class

Send multiple requests at once, (*4)

    $api = new Client;

    $execute = ExecuteRequest::make([
        new Request('wall.get', ['owner_id' => 1]),
        new Request('wall.get', ['owner_id' => 2]),
        // ... few requests
        new Request('wall.get', ['owner_id' => 25]),
    ]);

    $response = $api->send($execute);

Use a specific version of the API.

  $api = new Client('5.60');

Use with access token

Set default token in client., (*5)

    $api = new Client;

    $api->setDefaultToken("some_token");

    // ...

Or set token for specific request., (*6)

    $api = new Client;

    // Token in the request is a higher priority than the default token.
    $request = new Request('wall.get', ['owner_id' => 1], "some_token");

    // ...

Authorization

    $auth = new Auth('client_id', 'client_secret', 'redirect_uri');

    echo "<a href='{$auth->getUrl()}'>ClickMe<a>";

    // ...

    $token = $auth->getToken($_GET['code']);

License

MIT, (*7)

The Versions

04/10 2017

dev-master

9999999-dev

PHP client for Vk.com API

  Sources   Download

MIT

The Requires

 

api php vkontakte vk client vk.com

04/10 2017

1.3.0

1.3.0.0

PHP client for Vk.com API

  Sources   Download

MIT

The Requires

 

api php vkontakte vk client vk.com

06/02 2017

1.2.0

1.2.0.0

PHP client for Vk.com API

  Sources   Download

MIT

The Requires

 

api php vkontakte vk client vk.com

07/12 2016

2.0.x-dev

2.0.9999999.9999999-dev

PHP client for Vk.com API

  Sources   Download

MIT

The Requires

 

api php vkontakte vk client vk.com

24/11 2016

1.1.0

1.1.0.0

PHP client for Vk.com API

  Sources   Download

MIT

The Requires

 

api php vkontakte vk client vk.com

24/07 2016

1.0.0

1.0.0.0

PHP client for Vk.com API

  Sources   Download

MIT

The Requires

 

api php vkontakte vk client vk.com