Refactoring

This commit is contained in:
Justin Mazzocchi 2020-08-02 17:55:23 -07:00
parent 827c3cfc77
commit 0755e81ed9
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C
8 changed files with 6 additions and 7 deletions

View file

@ -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 }

View file

@ -1,7 +1,6 @@
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Alamofire
enum AccessTokenEndpoint {
case oauthToken(

View file

@ -1,7 +1,6 @@
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Alamofire
enum AccountEndpoint {
case verifyCredentials

View file

@ -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?)

View file

@ -1,7 +1,6 @@
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Alamofire
enum InstanceEndpoint {
case instance

View file

@ -2,7 +2,6 @@
import Foundation
import Combine
import Alamofire
class MastodonClient: HTTPClient {
var instanceURL: URL?

View file

@ -1,7 +1,6 @@
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Alamofire
protocol MastodonEndpoint {
associatedtype ResultType: Decodable

View file

@ -1,7 +1,6 @@
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Alamofire
struct MastodonTarget<E: MastodonEndpoint> {
let baseURL: URL