Documentation ¶
Index ¶
- Constants
- func WithCookieJar(jar http.CookieJar) client.ClientOption
- func WithCredentials(cred mmf.Credentials) client.ClientOption
- func WithDataDir(datadir string) client.ClientOption
- func WithDataStore(ds types.Store) client.ClientOption
- func WithTransport(transport http.RoundTripper) client.ClientOption
- type Client
- func (c *Client) Commit() error
- func (c *Client) GetPage(ctx context.Context, opt client.RequestOptions, page int) (*resty.Response, error)
- func (c *Client) GetPledgesLibrary(ctx context.Context) (*json.Objects, error)
- func (c *Client) GetPledgesLibraryPage(ctx context.Context, page int) (*json.Objects, error)
- func (c *Client) GetPurchasesLibrary(ctx context.Context) (*json.Objects, error)
- func (c *Client) GetPurchasesLibraryPage(ctx context.Context, page int) (*json.Objects, error)
- func (c *Client) GetSharedLibrary(ctx context.Context) (*json.Users, error)
- func (c *Client) GetSharedLibraryPage(ctx context.Context, page int) (*json.Users, error)
- func (c *Client) GetTribesLibrary(ctx context.Context) (*json.Tribes, error)
- func (c *Client) GetTribesLibraryPage(ctx context.Context, page int) (*json.Tribes, error)
- func (c *Client) GetWithContext(ctx context.Context, path string) (*resty.Response, error)
- func (c *Client) Init(cred mmf.Credentials, rc *resty.Client) *Client
- func (c *Client) RefreshLibraries(ctx context.Context) error
- func (c *Client) RefreshPledgesLibrary(ctx context.Context) error
- func (c *Client) RefreshPurchasesLibrary(ctx context.Context) error
- func (c *Client) RefreshSharedLibrary(ctx context.Context) error
- func (c *Client) RefreshTribesLibrary(ctx context.Context) error
- func (c *Client) Reload() error
- func (c *Client) SchedulePageRequest(opt client.RequestOptions, page int, fn ResponseHandler)
- type DownloadJob
- type Library
- type LibraryClientOption
- type LibraryClientOptionFunc
- type Queue
- type ResponseHandler
- type WorkJob
- type WorkQueue
- func (wq *WorkQueue) Add(f WorkJob)
- func (wq *WorkQueue) Cancel()
- func (wq *WorkQueue) Context() context.Context
- func (wq *WorkQueue) Done() <-chan error
- func (wq *WorkQueue) Download(opt client.RequestOptions, fn ResponseHandler)
- func (wq *WorkQueue) Init(c *Client)
- func (wq *WorkQueue) Poke()
- func (wq *WorkQueue) Request(req *DownloadJob)
- func (wq *WorkQueue) Spawn(f WorkJob)
- func (wq *WorkQueue) Start(n int32)
Constants ¶
View Source
const ( NextGroupObjectsUpdate = 2 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func WithCookieJar ¶
func WithCookieJar(jar http.CookieJar) client.ClientOption
func WithCredentials ¶
func WithCredentials(cred mmf.Credentials) client.ClientOption
func WithDataDir ¶
func WithDataDir(datadir string) client.ClientOption
func WithDataStore ¶
func WithDataStore(ds types.Store) client.ClientOption
func WithTransport ¶
func WithTransport(transport http.RoundTripper) client.ClientOption
Types ¶
type Client ¶
func New ¶
func New(cred mmf.Credentials) *Client
func NewWithClient ¶
func NewWithClient(cred mmf.Credentials, hc *http.Client) *Client
func NewWithOptions ¶
func NewWithOptions(options ...client.ClientOption) (*Client, error)
func NewWithTransport ¶
func NewWithTransport(cred mmf.Credentials, transport http.RoundTripper) *Client
func (*Client) GetPledgesLibrary ¶
get all JSON data of Pledges library
func (*Client) GetPledgesLibraryPage ¶
get requested page of JSON data of Pledges library
func (*Client) GetPurchasesLibrary ¶
get all JSON data of Purchases library
func (*Client) GetPurchasesLibraryPage ¶
get requested page of JSON data of Purchases library
func (*Client) GetSharedLibrary ¶
get all JSON data of Shared library
func (*Client) GetSharedLibraryPage ¶
get requested page of JSON data of Shared library
func (*Client) GetTribesLibrary ¶
get all JSON data of Tribes library
func (*Client) GetTribesLibraryPage ¶
get requested page of JSON data of Tribes library
func (*Client) GetWithContext ¶
func (*Client) RefreshLibraries ¶
pulls all data from the server
func (*Client) RefreshPledgesLibrary ¶
pull first page of Pledges library
func (*Client) RefreshPurchasesLibrary ¶
pull first page of Purchases library
func (*Client) RefreshSharedLibrary ¶
pull first page of Shared library
func (*Client) RefreshTribesLibrary ¶
pull first page of Tribes library
func (*Client) SchedulePageRequest ¶
func (c *Client) SchedulePageRequest(opt client.RequestOptions, page int, fn ResponseHandler)
type DownloadJob ¶
type DownloadJob struct { client.RequestOptions // contains filtered or unexported fields }
type LibraryClientOption ¶
type LibraryClientOption interface { client.ClientOption ApplyLibrary(*Client) error }
type LibraryClientOptionFunc ¶
func (LibraryClientOptionFunc) Apply ¶
func (f LibraryClientOptionFunc) Apply(c *client.Client) error
func (LibraryClientOptionFunc) ApplyLibrary ¶
func (f LibraryClientOptionFunc) ApplyLibrary(c *Client) error
type ResponseHandler ¶
type WorkQueue ¶
type WorkQueue struct {
// contains filtered or unexported fields
}
func (*WorkQueue) Download ¶
func (wq *WorkQueue) Download(opt client.RequestOptions, fn ResponseHandler)
func (*WorkQueue) Request ¶
func (wq *WorkQueue) Request(req *DownloadJob)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.