123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- package github
- import "context"
- type ActivityService service
- type FeedLink struct {
- HRef *string `json:"href,omitempty"`
- Type *string `json:"type,omitempty"`
- }
- type Feeds struct {
- TimelineURL *string `json:"timeline_url,omitempty"`
- UserURL *string `json:"user_url,omitempty"`
- CurrentUserPublicURL *string `json:"current_user_public_url,omitempty"`
- CurrentUserURL *string `json:"current_user_url,omitempty"`
- CurrentUserActorURL *string `json:"current_user_actor_url,omitempty"`
- CurrentUserOrganizationURL *string `json:"current_user_organization_url,omitempty"`
- CurrentUserOrganizationURLs []string `json:"current_user_organization_urls,omitempty"`
- Links *struct {
- Timeline *FeedLink `json:"timeline,omitempty"`
- User *FeedLink `json:"user,omitempty"`
- CurrentUserPublic *FeedLink `json:"current_user_public,omitempty"`
- CurrentUser *FeedLink `json:"current_user,omitempty"`
- CurrentUserActor *FeedLink `json:"current_user_actor,omitempty"`
- CurrentUserOrganization *FeedLink `json:"current_user_organization,omitempty"`
- CurrentUserOrganizations []FeedLink `json:"current_user_organizations,omitempty"`
- } `json:"_links,omitempty"`
- }
- func (s *ActivityService) ListFeeds(ctx context.Context) (*Feeds, *Response, error) {
- req, err := s.client.NewRequest("GET", "feeds", nil)
- if err != nil {
- return nil, nil, err
- }
- f := &Feeds{}
- resp, err := s.client.Do(ctx, req, f)
- if err != nil {
- return nil, resp, err
- }
- return f, resp, nil
- }
|