Browse Source

StarredRepository.repository has been renamed to .repo.

Doug Turner 11 years ago
committed by Will Norris
parent
commit
364d22ff1d
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      github/activity_star.go
  2. +2
    -2
      github/activity_star_test.go

+ 1
- 1
github/activity_star.go View File

@ -10,7 +10,7 @@ import "fmt"
// StarredRepository is returned by ListStarred.
type StarredRepository struct {
StarredAt *Timestamp `json:"starred_at,omitempty"`
Repository *Repository `json:"repository,omitempty"`
Repository *Repository `json:"repo,omitempty"`
}
// ListStargazers lists people who have starred the specified repo.


+ 2
- 2
github/activity_star_test.go View File

@ -44,7 +44,7 @@ func TestActivityService_ListStarred_authenticatedUser(t *testing.T) {
mux.HandleFunc("/user/starred", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testHeader(t, r, "Accept", mediaTypeStarringPreview)
fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repository":{"id":1}}]`)
fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repo":{"id":1}}]`)
})
repos, _, err := client.Activity.ListStarred("", nil)
@ -70,7 +70,7 @@ func TestActivityService_ListStarred_specifiedUser(t *testing.T) {
"direction": "asc",
"page": "2",
})
fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repository":{"id":2}}]`)
fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repo":{"id":2}}]`)
})
opt := &ActivityListStarredOptions{"created", "asc", ListOptions{Page: 2}}


Loading…
Cancel
Save