diff --git a/Shared/Networking/HTTPTarget.swift b/Shared/Networking/HTTPTarget.swift index 80001ca..753b222 100644 --- a/Shared/Networking/HTTPTarget.swift +++ b/Shared/Networking/HTTPTarget.swift @@ -3,6 +3,12 @@ import Foundation import Alamofire +typealias HTTPMethod = Alamofire.HTTPMethod +typealias HTTPHeaders = Alamofire.HTTPHeaders +typealias ParameterEncoding = Alamofire.ParameterEncoding +typealias URLEncoding = Alamofire.URLEncoding +typealias JSONEncoding = Alamofire.JSONEncoding + protocol HTTPTarget: URLRequestConvertible { var baseURL: URL { get } var pathComponents: [String] { get } diff --git a/Shared/Networking/Mastodon API/AccessTokenEndpoint.swift b/Shared/Networking/Mastodon API/AccessTokenEndpoint.swift index e075766..0ab60b5 100644 --- a/Shared/Networking/Mastodon API/AccessTokenEndpoint.swift +++ b/Shared/Networking/Mastodon API/AccessTokenEndpoint.swift @@ -1,7 +1,6 @@ // Copyright © 2020 Metabolist. All rights reserved. import Foundation -import Alamofire enum AccessTokenEndpoint { case oauthToken( diff --git a/Shared/Networking/Mastodon API/AccountEndpoint.swift b/Shared/Networking/Mastodon API/AccountEndpoint.swift index fa8eecc..ac7e666 100644 --- a/Shared/Networking/Mastodon API/AccountEndpoint.swift +++ b/Shared/Networking/Mastodon API/AccountEndpoint.swift @@ -1,7 +1,6 @@ // Copyright © 2020 Metabolist. All rights reserved. import Foundation -import Alamofire enum AccountEndpoint { case verifyCredentials diff --git a/Shared/Networking/Mastodon API/AppAuthorizationEndpoint.swift b/Shared/Networking/Mastodon API/AppAuthorizationEndpoint.swift index e4d33f2..a431f23 100644 --- a/Shared/Networking/Mastodon API/AppAuthorizationEndpoint.swift +++ b/Shared/Networking/Mastodon API/AppAuthorizationEndpoint.swift @@ -1,7 +1,6 @@ // Copyright © 2020 Metabolist. All rights reserved. import Foundation -import Alamofire enum AppAuthorizationEndpoint { case apps(clientName: String, redirectURI: String, scopes: String, website: URL?) diff --git a/Shared/Networking/Mastodon API/InstanceEndpoint.swift b/Shared/Networking/Mastodon API/InstanceEndpoint.swift index fb05817..8483774 100644 --- a/Shared/Networking/Mastodon API/InstanceEndpoint.swift +++ b/Shared/Networking/Mastodon API/InstanceEndpoint.swift @@ -1,7 +1,6 @@ // Copyright © 2020 Metabolist. All rights reserved. import Foundation -import Alamofire enum InstanceEndpoint { case instance diff --git a/Shared/Networking/Mastodon API/MastodonClient.swift b/Shared/Networking/Mastodon API/MastodonClient.swift index cea9df7..3a65689 100644 --- a/Shared/Networking/Mastodon API/MastodonClient.swift +++ b/Shared/Networking/Mastodon API/MastodonClient.swift @@ -2,7 +2,6 @@ import Foundation import Combine -import Alamofire class MastodonClient: HTTPClient { var instanceURL: URL? diff --git a/Shared/Networking/Mastodon API/MastodonEndpoint.swift b/Shared/Networking/Mastodon API/MastodonEndpoint.swift index dbd97f5..a4bea7c 100644 --- a/Shared/Networking/Mastodon API/MastodonEndpoint.swift +++ b/Shared/Networking/Mastodon API/MastodonEndpoint.swift @@ -1,7 +1,6 @@ // Copyright © 2020 Metabolist. All rights reserved. import Foundation -import Alamofire protocol MastodonEndpoint { associatedtype ResultType: Decodable diff --git a/Shared/Networking/Mastodon API/MastodonTarget.swift b/Shared/Networking/Mastodon API/MastodonTarget.swift index f1c2cdf..9cbf9eb 100644 --- a/Shared/Networking/Mastodon API/MastodonTarget.swift +++ b/Shared/Networking/Mastodon API/MastodonTarget.swift @@ -1,7 +1,6 @@ // Copyright © 2020 Metabolist. All rights reserved. import Foundation -import Alamofire struct MastodonTarget { let baseURL: URL