Exemplo n.º 1
0
func NewAPI(opts APIOptions) *API {
	c := client.NewClient(client.ClientOptions(opts))
	return &API{
		Account: &api.Account{c},
		Book:    &api.Book{c},
		Books:   &api.Books{c},
		User:    &api.User{c},
	}
}
Exemplo n.º 2
0
func (a *API) Fork(opts APIOptions) *API {
	forkedClient := a.Client.Fork(client.ClientOptions(opts))
	return NewAPIFromClient(forkedClient)
}
Exemplo n.º 3
0
func NewAPI(opts APIOptions) *API {
	c := client.NewClient(client.ClientOptions(opts))
	return NewAPIFromClient(c)
}