PHP code example of atkrad / webhook-event-manager

1. Go to this page and download the library: Download atkrad/webhook-event-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

atkrad / webhook-event-manager example snippets



use WebHookEventManager\WebHook;

$webHook = new WebHook();

//Get repository owner's avatar url
$avatarUrl = $webHook->getGitHubService()
    ->getIssuesEvent()
    ->getRepository()
    ->getOwner()
    ->getAvatarUrl();

//Get sender's followers url
$followersUrl = $webHook->getGitHubService()
    ->getIssuesEvent()
    ->getSender()
    ->getFollowersUrl();

//Get pusher's username
$pusherUsername = $webHook->getGitHubService()
    ->getPushEvent()
    ->getPusher()
    ->getUsername();