policy/auth.go
func fromAPI(api *rsapi.API) *API {
	api.FileEncoding = rsapi.FileEncodingJSON
	api.Host = HostFromLogin(api.Host)
	api.Metadata = GenMetadata
	api.VersionHeader = "Api-Version"
	return &API{api}
}
func fromAPI(api *rsapi.API) *API {
	api.FileEncoding = rsapi.FileEncodingJSON
	api.Host = HostFromLogin(api.Host)
	api.Metadata = GenMetadata
	api.VersionHeader = "Api-Version"
	return &API{api}
}
// Wrap generic client into API 1.0 client