Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11691280
WatchEvent.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
WatchEvent.php
View Options
<?php
namespace
Nasqueron\Notifications\Analyzers\GitHub\Events
;
/**
* WatchEvent payload analyzer
*
* Triggered when an user stars a repository.
*
* The current starring action on GitHub is the old watch action. To avoid
* to break code, former event name have been kept in the API.
*
* @link https://developer.github.com/changes/2012-09-05-watcher-api/
* @link https://developer.github.com/v3/activity/events/types/#watchevent
*/
class
WatchEvent
extends
Event
{
/**
* Gets description for the payload
*
* @return string
*/
public
function
getDescription
()
:
string
{
return
trans
(
'GitHub.EventsDescriptions.WatchEvent'
,
[
'user'
=>
$this
->
payload
->
sender
->
login
,
'repository'
=>
$this
->
payload
->
repository
->
full_name
,
]
);
}
/**
* Gets link for the payload
*
* @return string
*/
public
function
getLink
()
:
string
{
return
$this
->
payload
->
sender
->
html_url
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Sep 12, 20:55 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2978332
Default Alt Text
WatchEvent.php (1 KB)
Attached To
Mode
rNOTIF Notifications center
Attached
Detach File
Event Timeline
Log In to Comment