Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetailsClient ¶
type DetailsClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(settings Settings) *DetailsClient
New returns a new DetailsClient instance based on the provided settings. It configures the Resty client with the provided settings, sets the retry count and backoff time, and sets the base URL.
func (*DetailsClient) GetSongDetails ¶
func (c *DetailsClient) GetSongDetails( ctx context.Context, title models.SongTitle, ) (models.SongDetail, error)
GetSongDetails retrieves the details of a song with the given title from the details server.
It logs debug messages before and after retrieving the details, and error messages if an error occurs.
Parameters:
- ctx: The context for managing cancellation.
- title: The models.SongTitle of the song whose details are to be retrieved.
Returns:
- The models.SongDetail of the song if successful.
- An error if the operation fails or if no details are found.
Click to show internal directories.
Click to hide internal directories.