Method: Github::Activity::Notifications#create

Defined in:
lib/github_api/activity/notifications.rb

#create(*args) ⇒ Object

Create 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

  • :subscribed - boolean - determines if notifications should be

    received from this thread.
    
  • :ignored - boolean - deterimines if all notifications should be

    blocked from this thread.
    

Examples

github = Github.new oauth_token: 'token'
github.activity.notifications.create 'thread-id',
  'subscribed': true
  'ignored': false


137
138
139
140
141
# File 'lib/github_api/activity/notifications.rb', line 137

def create(*args)
  arguments(args, :required => [:thread_id])

  put_request("/notifications/threads/#{thread_id}/subscription", arguments.params)
end