Contents

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 -> SHMediaItem

Parameters

  • 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:

    mediaItem

    A media item.

    error

    An error object if a problem occurs when fetching the media item; otherwise, nil.

Discussion

See Also

Working with Shazam music catalog media items