notifications: Index | Files

package githubapi

import ""

Package githubapi implements notifications.Service using GitHub API clients.


Package Files


func NewService Uses

func NewService(clientV3 *githubv3.Client, clientV4 *githubv4.Client, router github.Router) notifications.Service

NewService creates a GitHub-backed notifications.Service using given GitHub clients. At this time it infers the current user from the client (its authentication info), and cannot be used to serve multiple users.

Caching can't be used for Activity.ListNotifications until GitHub REST API v3 fixes the odd behavior of returning 304 even when some notifications get marked as read. Otherwise read notifications remain forever (until a new notification comes in).

This service uses Cache-Control: no-cache request header to disable caching. Responses from cache must be marked with "X-From-Cache" header (i.e., the field MarkCachedResponses in httpcache.Transport must be set to true).

If router is nil, github.DotCom router is used, which links to subjects on

Package githubapi imports 16 packages (graph) and is imported by 2 packages. Updated 2018-11-13. Refresh now. Tools for package owners.