2017 © Pedro Peláez
 

library vk-parser

The parser of the social network vk.com

image

mikeevstropov/vk-parser

The parser of the social network vk.com

  • Monday, June 26, 2017
  • by mikeevstropov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

mikeevstropov/vk-parser

The parser of the social network vk.com, (*1)

Installation

Add dependency mikeevstropov/vk-parser, (*2)

$ composer require mikeevstropov/vk-parser

Usage

Sorry, but examples will not be provided for this library., (*3)

VideoParser Interface

  • __constructor, (*4)

    VideoParser constructor, (*5)

    Arguments:, (*6)

    • client (GuzzleHttp\ClientInterface) - client instance required
    • logger (null|Psr\Log\LoggerInterface) - logger instance or null as default

    Returns:, (*7)

    • Mikeevstropov\VkParser\VideoParser
  • getSourceList, (*8)

    Getting the source list, (*9)

    Arguments:, (*10)

    • ownerId (string) - ID of the video owner is required
    • id (string) - ID of the video is required
    • userSession (null|GuzzleHttp\Cookie\CookieJar) - user session or null as default

    Returns:, (*11)

    • array - contain a keys "static", "embed" and "stream"
    • false - video does not exist, private (adult also) or blocked by law
    • null - source of the video is not supported

ExtendedVideoParser Interface

  • __constructor, (*12)

    ExtendedVideoParser constructor, (*13)

    Arguments:, (*14)

    • client (GuzzleHttp\ClientInterface) - client instance required
    • logger (null|Psr\Log\LoggerInterface) - logger instance or null as default
    • cache (null|Psr\SimpleCache\CacheInterface) - cache instance or null as default

    Returns:, (*15)

    • Mikeevstropov\VkParser\ExtendedVideoParser
  • getSourceList, (*16)

    Getting the source list, (*17)

    Arguments:, (*18)

    • ownerId (string) - ID of the video owner is required
    • id (string) - ID of the video is required
    • userSession (null|GuzzleHttp\Cookie\CookieJar) - user session or null as default
    • cache (bool) - use the cache, is true as default
    • cacheTtl (null|int) - number of seconds or null as default

    Returns:, (*19)

    • array - contain a keys "static", "embed" and "stream"
    • false - video does not exist, private (adult also) or blocked by law
    • null - source of the video is not supported

Development

Clone, (*20)

$ git clone https://github.com/mikeevstropov/vk-parser.git

Go to project, (*21)

$ cd vk-parser

Install dependencies, (*22)

$ composer install

Set permissions, (*23)

$ sudo chmod 777 ./var -v -R

Configure testing environment in phpunit.xml. Make sure the environment variables "userLogin", "userPassword" and "applicationId" is not empty., (*24)

<phpunit>
    <php>
        <env name="logLevel" value="DEBUG"/>
        <env name="logFile" value="var/logs/parser.test.log"/>
        <env name="memcachedConnection" value="memcached://localhost"/>
        <env name="userLogin" value=""/>
        <env name="userPassword" value=""/>
        <env name="applicationId" value=""/>
    </php>
</phpunit>

Increase composer timeout. Since composer by default set it to 300 seconds., (*25)

$ composer config --global process-timeout 900

Run the tests, (*26)

$ composer test

The Versions

26/06 2017

dev-master

9999999-dev

The parser of the social network vk.com

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Mike Evstropov

26/06 2017

1.0.2

1.0.2.0

The parser of the social network vk.com

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Mike Evstropov

22/06 2017

1.0.1

1.0.1.0

The parser of the social network vk.com

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Mike Evstropov

21/06 2017

1.0.0

1.0.0.0

The parser of the social network vk.com

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Mike Evstropov