Skip to content

Commit

Permalink
Add new import for Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif committed Nov 16, 2024
1 parent d8e4505 commit ba74a08
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Later/Network/API.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/// An open class that defines the base API. It will request data from a network pointing to a specific API endpoint.
open class API<APIEndpoint: Endpoint> {
Expand Down
3 changes: 3 additions & 0 deletions Sources/Later/Network/DataResponse.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/// Represents a response containing data and a URL response.
public struct DataResponse {
Expand Down
3 changes: 3 additions & 0 deletions Sources/Later/Network/Endpoint.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/**
This protocol defines the basic structure of an endpoint in a HTTP network request.
Expand Down
3 changes: 3 additions & 0 deletions Sources/Later/Network/MockNetwork.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/// A class that implements the `Networking` protocol to provide mock network responses.
open class MockNetwork: Network {
Expand Down
3 changes: 3 additions & 0 deletions Sources/Later/Network/Network.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/// A class that implements the `Networking` protocol to perform network requests using URLSession.
open class Network: Networking {
Expand Down
3 changes: 3 additions & 0 deletions Sources/Later/Network/Networking.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

/// A protocol defining networking methods for making HTTP requests.
public protocol Networking {
Expand Down

0 comments on commit ba74a08

Please sign in to comment.