module Octokit::Client::Notifications

def delete_thread_subscription(thread_id, options = {})

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription -

Returns:
  • (Boolean) - True if delete successful, false otherwise.

Parameters:
  • thread_id (Integer) -- Id of the thread.
def delete_thread_subscription(thread_id, options = {})
  boolean_from_response :delete, "notifications/threads/#{thread_id}/subscription", options
end

def mark_notifications_as_read(options = {})

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#mark-as-read -

Returns:
  • (Boolean) - True if marked as read, false otherwise

Options Hash: (**options)
  • :last_read_at (String) -- Describes the last point
  • :read (Boolean) -- Inverse of 'unread'.
  • :unread (Boolean) -- Changes the unread status of the

Parameters:
  • options (Hash) -- Optional parameters
def mark_notifications_as_read(options = {})
  request :put, 'notifications', options
  last_response.status == 205
end

def mark_repository_notifications_as_read(repo, options = {})

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository -

Returns:
  • (Boolean) - True if marked as read, false otherwise

Options Hash: (**options)
  • :last_read_at (String) -- Describes the last point
  • :read (Boolean) -- Inverse of 'unread'.
  • :unread (Boolean) -- Changes the unread status of the

Parameters:
  • options (Hash) -- Optional parameters
  • repo (Integer, String, Hash, Repository) -- A GitHub repository
def mark_repository_notifications_as_read(repo, options = {})
  request :put, "#{Repository.path repo}/notifications", options
  last_response.status == 205
end

def mark_thread_as_read(thread_id, options = {})

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read -

Returns:
  • (Boolean) - True if updated, false otherwise.

Parameters:
  • thread_id (Integer) -- Id of the thread to update.
def mark_thread_as_read(thread_id, options = {})
  request :patch, "notifications/threads/#{thread_id}", options
  last_response.status == 205
end

def notifications(options = {})

Other tags:
    Example: Get all notifications since a certain time. -
    Example: Get users notifications -

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#list-your-notifications -

Returns:
  • (Array) - Array of notifications.

Options Hash: (**options)
  • :since (String) -- Time filters out any notifications
  • :participating (Boolean) -- 'true' to show only
  • :all (Boolean) -- 'true' to show notifications marked as

Parameters:
  • options (Hash) -- Optional parameters
def notifications(options = {})
  paginate 'notifications', options
end

def repository_notifications(repo, options = {})

Other tags:
    Example: Get your notifications for octokit/octokit.rb since a time. -
    Example: Get your notifications for octokit/octokit.rb -

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository -

Returns:
  • (Array) - Array of notifications.

Options Hash: (**options)
  • :since (String) -- Time filters out any notifications
  • :participating (Boolean) -- 'true' to show only
  • :all (Boolean) -- 'true' to show notifications marked as

Parameters:
  • options (Hash) -- Optional parameters
  • repo (Integer, String, Hash, Repository) -- A GitHub repository
def repository_notifications(repo, options = {})
  paginate "#{Repository.path repo}/notifications", options
end

def thread_notifications(thread_id, options = {})

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#view-a-single-thread -

Returns:
  • (Array) - Array of notifications.

Parameters:
  • thread_id (Integer) -- Id of the thread.
def thread_notifications(thread_id, options = {})
  get "notifications/threads/#{thread_id}", options
end

def thread_subscription(thread_id, options = {})

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#get-a-thread-subscription -

Returns:
  • (Sawyer::Resource) - Subscription.

Parameters:
  • thread_id (Integer) -- Id of the thread.
def thread_subscription(thread_id, options = {})
  get "notifications/threads/#{thread_id}/subscription", options
end

def update_thread_subscription(thread_id, options = {})

Other tags:
    Example: Ignore notifications from a repo -
    Example: Subscribe to notifications -

Other tags:
    See: https://developer.github.com/v3/activity/notifications/#set-a-thread-subscription -

Returns:
  • (Sawyer::Resource) - Updated subscription.

Options Hash: (**options)
  • :ignored (Boolean) -- Deterimines if all notifications
  • :subscribed (Boolean) -- Determines if notifications

Parameters:
  • options () --
  • thread_id (Integer) -- Id of the thread.
def update_thread_subscription(thread_id, options = {})
  put "notifications/threads/#{thread_id}/subscription", options
end