Browse Source

improve docs of SetRepositorySubscription and DeleteRepositorySubscription

Add blank lines to keep paragraphs separate.
Without a blank line, all sentences get merged into a single paragraph, which would make this less readable.
Adjust language to be more specific to go-github's methods.
Shorten it by removing some unneeded phrases like "if you would like to".
Refer to methods in go-github rather than endpoints, and be more specific about actions.
This is done to try to make it more readable and clear.

Fixes #477.
Closes #489.

Change-Id: I9e9171d0a77a1c029c804cbd50fb2e194b1c2a1d
Ronak Jain 9 years ago
committed by Glenn Lewis
parent
commit
5c45bca952
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      github/activity_watching.go

+ 7
- 0
github/activity_watching.go View File

@ -103,6 +103,10 @@ func (s *ActivityService) GetRepositorySubscription(owner, repo string) (*Subscr
// SetRepositorySubscription sets the subscription for the specified repository
// for the authenticated user.
//
// To watch a repository, set subscription.Subscribed to true.
// To ignore notifications made within a repository, set subscription.Ignored to true.
// To stop watching a repository, use DeleteRepositorySubscription.
//
// GitHub API Docs: https://developer.github.com/v3/activity/watching/#set-a-repository-subscription
func (s *ActivityService) SetRepositorySubscription(owner, repo string, subscription *Subscription) (*Subscription, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/subscription", owner, repo)
@ -124,6 +128,9 @@ func (s *ActivityService) SetRepositorySubscription(owner, repo string, subscrip
// DeleteRepositorySubscription deletes the subscription for the specified
// repository for the authenticated user.
//
// This is used to stop watching a repository. To control whether or not to
// receive notifications from a repository, use SetRepositorySubscription.
//
// GitHub API Docs: https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription
func (s *ActivityService) DeleteRepositorySubscription(owner, repo string) (*Response, error) {
u := fmt.Sprintf("repos/%s/%s/subscription", owner, repo)


Loading…
Cancel
Save