Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions InternetArchiveKit/InternetArchiveProtocols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@

import Foundation

/// A protocol to which the main `InternetArchive` class conforms
public protocol InternetArchiveProtocol {
/// A protocol to which the main `InternetArchive` class conforms.
///
/// Refines `Sendable`: the client is a stateless request builder over a
/// `URLSession`, safe to share across concurrency domains (the concrete
/// `InternetArchive` is `@unchecked Sendable`). This lets callers hold an
/// `any InternetArchiveProtocol` inside an actor or send it across isolation
/// boundaries.
public protocol InternetArchiveProtocol: Sendable {
/**
Search the Internet Archive

Expand Down Expand Up @@ -66,7 +72,7 @@
- completion: Returns optional `InternetArchive.SearchResponse` and `Error` objects
*/
@available(*, deprecated, message: "Use the async version instead")
func search(

Check warning on line 75 in InternetArchiveKit/InternetArchiveProtocols.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Function should have 5 parameters or less: it currently has 6 (function_parameter_count)
query: InternetArchiveURLStringProtocol,
page: Int,
rows: Int,
Expand Down Expand Up @@ -222,7 +228,7 @@
func generateItemImageUrl(itemIdentifier: String) -> URL?
func generateMetadataUrl(identifier: String) -> URL?
func generateDownloadUrl(itemIdentifier: String, fileName: String) -> URL?
func generateSearchUrl(

Check warning on line 231 in InternetArchiveKit/InternetArchiveProtocols.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Function should have 5 parameters or less: it currently has 6 (function_parameter_count)
query: InternetArchiveURLStringProtocol,
page: Int,
rows: Int,
Expand Down Expand Up @@ -314,7 +320,7 @@
/** @inheritdoc */
public func itemDetail(identifier: String) async throws
-> InternetArchive.Item
{

Check warning on line 323 in InternetArchiveKit/InternetArchiveProtocols.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Opening braces should be preceded by a single space and on the same line as the declaration (opening_brace)
let result: Result<InternetArchive.Item, Error> = await itemDetail(
identifier: identifier
)
Expand Down
Loading