2017 © Pedro Peláez
 

library github-event

Github Api Public Events to PHP Objects Mapper

image

ikwattro/github-event

Github Api Public Events to PHP Objects Mapper

  • Monday, June 29, 2015
  • by ikwattro
  • Repository
  • 1 Watchers
  • 2 Stars
  • 109 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 16 Versions
  • 0 % Grown

The README.md

GithubEvent Object Mapper

Build Status, (*1)

Github Api Public Events to PHP Objects

Transforms the Github API Public Events into PHP Objects, (*2)

Installation

Require the library in your composer.json, (*3)

composer require ikwattro/github-event

Usage

Building the EventHandler

The application need to be built through the factory constructor, currently there is no need for such factory design but it aims to be extensible for future usages., (*4)


use Ikwattro\GithubEvent\EventHandler; $eventHandler = EventHandler::create() ->build();

Passing events

The mainpoint of the library is the handleEvent method that takes the GithubEvent as argument in an array format (json_decoded)., (*5)

Once passed, you'll receive in return the corresponding PHP Object instance corresponding to the event., (*6)

$events = json_decode('events.json', true);

foreach ($events as $e) {
    $event = $eventHandler->handleEvent($e);
}

Working with Events

An event object may contain more than the current event, for e.g., a CreateEvent will contain the payload of the event, but also the associated Repository object, RepositoryOwner, ... ., (*7)

Please refer to the source code for discovering what is inside each event., (*8)

Currently supported events

  • [x] WatchEvent
  • [x] IssuesEvent
  • [x] IssueCommentEvent
  • [x] CreateEvent
  • [x] PushEvent
  • [ ] ForkEvent
  • [x] PullRequestEvent

License

The library is licensed under the MIT License, (*9)

Author

Christophe Willemsen Twitter: @ikwattro, (*10)

The Versions

29/06 2015

dev-master

9999999-dev

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

29/06 2015

1.0.10

1.0.10.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

29/06 2015

1.0.9

1.0.9.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

29/06 2015

1.0.8

1.0.8.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

23/02 2015

1.0.7

1.0.7.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

21/02 2015

1.0.6

1.0.6.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

21/02 2015

1.0.5

1.0.5.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

20/02 2015

1.0.4

1.0.4.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

15/02 2015

1.0.3

1.0.3.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

15/02 2015

1.0.2

1.0.2.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

15/02 2015

1.0.1

1.0.1.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

14/02 2015

1.0.0

1.0.0.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

18/01 2015

0.1.3

0.1.3.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

18/01 2015

0.1.2

0.1.2.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

17/01 2015

0.1.1

0.1.1.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires

17/01 2015

0.1.0

0.1.0.0

Github Api Public Events to PHP Objects Mapper

  Sources   Download

MIT

The Requires

 

The Development Requires