Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestAccountAuth ¶
func TestAccountAuth() (types.Authorization, error)
TestAccountAuth gets the test account Authorization
Authorization details are obtained from the "GO_NIXPLAY_TEST_ACCOUNT_USERNAME" and "GO_NIXPLAY_TEST_ACCOUNT_PASSWORD" environment variables. For more details see https://github.com/anitschke/go-nixplay/#testing
Types ¶
type AuthorizedClient ¶
type AuthorizedClient struct {
// contains filtered or unexported fields
}
AuthorizedClient is a httpx.Client that appends the required headers and cookies when sending requests to Nixplay so that the requests are authorized
It is safe to use AuthorizedClient to requests to other domains as well, when this happens the client will do the right thing and will NOT authorize the request.
func NewAuthorizedClient ¶
func NewAuthorizedClient(ctx context.Context, client httpx.Client, authIn types.Authorization) (*AuthorizedClient, error)
Click to show internal directories.
Click to hide internal directories.