client

package
v0.0.0-...-ff1f24d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2015 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Beginning = 0

Variables

This section is empty.

Functions

func NewClient

func NewClient(accessToken string) *v3Client

Types

type Client

type Client interface {
	// Get activity summaries. Oldest are returned first.
	// Only activites with ids greater than the given after are included.
	// Pass Beginning as after to get all activities.
	GetActivitySummaries(after model.ActivityId) ([]*model.ActivitySummary, error)

	// Get an activity by its id.
	GetActivity(activityId model.ActivityId) (*model.Activity, error)

	// Get multiple activities by their ids, returned in the same order.
	// Activities that could not be fetched are excluded.
	GetActivities(activityIds []model.ActivityId) ([]*model.Activity, error)

	// Get activities summaries for activities related to the given activity id.
	GetRelatedActivitySummaries(activityId model.ActivityId) ([]*model.ActivitySummary, error)
}

type HttpClient

type HttpClient interface {
	AbsoluteUrl(relativeUrl string, params map[string]interface{}) (string, error)

	Get(relativePath string, params map[string]interface{}) ([]byte, error)
}

Internal HTTP client. Interface to allow for testing implementations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL