class JGithubPackageActivityNotifications extends JGithubPackage

GitHub API Activity Events class for the Joomla Platform.

Methods

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

__get( string $name)

Magic method to lazily create API objects

object
getList( boolean $all = true, boolean $participating = true, JDate $since = null)

List your notifications.

object
getListRepository( string $owner, string $repo, boolean $all = true, boolean $participating = true, JDate $since = null)

List your notifications in a repository.

object
markRead( boolean $unread = true, boolean $read = true, JDate $last_read_at = null)

Mark as read.

object
markReadRepository( string $owner, string $repo, boolean $unread, boolean $read, JDate $last_read_at = null)

Mark notifications as read in a repository.

object
viewThread( integer $id)

View a single thread.

object
markReadThread( integer $id, boolean $unread = true, boolean $read = true)

Mark a thread as read.

object
getThreadSubscription( integer $id)

Get a Thread Subscription.

object
setThreadSubscription( integer $id, boolean $subscribed, boolean $ignored)

Set a Thread Subscription.

object
deleteThreadSubscription( integer $id)

Delete a Thread Subscription.

Details

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

Parameters

Registry $options GitHub options object.
JGithubHttp $client The HTTP client object.

JGithubPackage __get( string $name)

Magic method to lazily create API objects

Parameters

string $name Name of property to retrieve

Return Value

JGithubPackage GitHub API package object.

Exceptions

RuntimeException

object getList( boolean $all = true, boolean $participating = true, JDate $since = null)

List your notifications.

List all notifications for the current user, grouped by repository.

Parameters

boolean $all True to show notifications marked as read.
boolean $participating True to show only notifications in which the user is directly participating or mentioned.
JDate $since filters out any notifications updated before the given time. The time should be passed in as UTC in the ISO 8601 format.

Return Value

object

object getListRepository( string $owner, string $repo, boolean $all = true, boolean $participating = true, JDate $since = null)

List your notifications in a repository.

List all notifications for the current user.

Parameters

string $owner Repository owner.
string $repo Repository name.
boolean $all True to show notifications marked as read.
boolean $participating True to show only notifications in which the user is directly participating or mentioned.
JDate $since filters out any notifications updated before the given time. The time should be passed in as UTC in the ISO 8601 format.

Return Value

object

object markRead( boolean $unread = true, boolean $read = true, JDate $last_read_at = null)

Mark as read.

Marking a notification as “read” removes it from the default view on GitHub.com.

Parameters

boolean $unread Changes the unread status of the threads.
boolean $read Inverse of “unread”.
JDate $last_read_at Describes the last point that notifications were checked. Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format.

Return Value

object

object markReadRepository( string $owner, string $repo, boolean $unread, boolean $read, JDate $last_read_at = null)

Mark notifications as read in a repository.

Marking all notifications in a repository as “read” removes them from the default view on GitHub.com.

Parameters

string $owner Repository owner.
string $repo Repository name.
boolean $unread Changes the unread status of the threads.
boolean $read Inverse of “unread”.
JDate $last_read_at Describes the last point that notifications were checked. Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format.

Return Value

object

object viewThread( integer $id)

View a single thread.

Parameters

integer $id The thread id.

Return Value

object

object markReadThread( integer $id, boolean $unread = true, boolean $read = true)

Mark a thread as read.

Parameters

integer $id The thread id.
boolean $unread Changes the unread status of the threads.
boolean $read Inverse of “unread”.

Return Value

object

object getThreadSubscription( integer $id)

Get a Thread Subscription.

This checks to see if the current user is subscribed to a thread. You can also get a Repository subscription.

Parameters

integer $id The thread id.

Return Value

object

object setThreadSubscription( integer $id, boolean $subscribed, boolean $ignored)

Set a Thread Subscription.

This lets you subscribe to a thread, or ignore it. Subscribing to a thread is unnecessary if the user is already subscribed to the repository. Ignoring a thread will mute all future notifications (until you comment or get @mentioned).

Parameters

integer $id The thread id.
boolean $subscribed Determines if notifications should be received from this thread.
boolean $ignored Determines if all notifications should be blocked from this thread.

Return Value

object

object deleteThreadSubscription( integer $id)

Delete a Thread Subscription.

Parameters

integer $id The thread id.

Return Value

object