예제 #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},
	}
}
예제 #2
0
func (a *API) Fork(opts APIOptions) *API {
	forkedClient := a.Client.Fork(client.ClientOptions(opts))
	return NewAPIFromClient(forkedClient)
}
예제 #3
0
func NewAPI(opts APIOptions) *API {
	c := client.NewClient(client.ClientOptions(opts))
	return NewAPIFromClient(c)
}