fetch(shazamID:completionHandler:)
Requests the media item for the song with the specified Shazam ID.
Declaration
class func fetch(shazamID: String, completionHandler: @escaping @Sendable (SHMediaItem?, (any Error)?) -> Void)class func fetch(shazamID: String) async throws -> SHMediaItemParameters
- shazamID:
The Shazam ID of the song.
- completionHandler:
The completion handler that the system calls with the result of the request.
This block takes the following parameters:
mediaItemA media item.
errorAn error object if a problem occurs when fetching the media item; otherwise,
nil.