-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charlie Fish <[email protected]>
- Loading branch information
1 parent
8289e13
commit ef9322b
Showing
17 changed files
with
148 additions
and
59 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
Sources/Lemmy-Swift-Client/Lemmy API/Requests/ExportSettings.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
public struct ExportSettingsRequest: APIRequest { | ||
public typealias Response = any | ||
|
||
public static let httpMethod: HTTPMethod = .get | ||
public static let path: String = "/user/export_settings" | ||
|
||
public init() {} | ||
} |
18 changes: 18 additions & 0 deletions
18
Sources/Lemmy-Swift-Client/Lemmy API/Requests/GenerateTotpSecret.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
public struct GenerateTotpSecretRequest: APIRequest { | ||
public typealias Response = GenerateTotpSecretResponse | ||
|
||
public static let httpMethod: HTTPMethod = .post | ||
public static let path: String = "/user/totp/generate" | ||
|
||
public init() {} | ||
} | ||
|
||
public struct GenerateTotpSecretResponse: APIResponse { | ||
public let totp_secret_url: String? | ||
|
||
public init( | ||
totp_secret_url: String? = nil | ||
) { | ||
self.totp_secret_url = totp_secret_url | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Sources/Lemmy-Swift-Client/Lemmy API/Requests/GetBannedPersons.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
public struct GetBannedPersonsRequest: APIRequest { | ||
public typealias Response = BannedPersonsResponse | ||
|
||
public static let httpMethod: HTTPMethod = .get | ||
public static let path: String = "/user/banned" | ||
|
||
public init() {} | ||
} | ||
|
||
public struct BannedPersonsResponse: APIResponse { | ||
public let banned: [PersonView]? | ||
|
||
public init( | ||
banned: [PersonView]? = nil | ||
) { | ||
self.banned = banned | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Sources/Lemmy-Swift-Client/Lemmy API/Requests/GetCaptcha.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
public struct GetCaptchaRequest: APIRequest { | ||
public typealias Response = GetCaptchaResponse | ||
|
||
public static let httpMethod: HTTPMethod = .get | ||
public static let path: String = "/user/get_captcha" | ||
|
||
public init() {} | ||
} | ||
|
||
public struct GetCaptchaResponse: APIResponse { | ||
public let ok: CaptchaResponse? | ||
|
||
public init( | ||
ok: CaptchaResponse? = nil | ||
) { | ||
self.ok = ok | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Sources/Lemmy-Swift-Client/Lemmy API/Requests/GetFederatedInstances.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
public struct GetFederatedInstancesRequest: APIRequest { | ||
public typealias Response = GetFederatedInstancesResponse | ||
|
||
public static let httpMethod: HTTPMethod = .get | ||
public static let path: String = "/federated_instances" | ||
|
||
public init() {} | ||
} | ||
|
||
public struct GetFederatedInstancesResponse: APIResponse { | ||
public let federated_instances: FederatedInstances? | ||
|
||
public init( | ||
federated_instances: FederatedInstances? = nil | ||
) { | ||
self.federated_instances = federated_instances | ||
} | ||
} |
11 changes: 9 additions & 2 deletions
11
...t/Lemmy API/Structs/GetSiteResponse.swift → ...t-Client/Lemmy API/Requests/GetSite.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
... API/Structs/GetUnreadCountResponse.swift → ...t/Lemmy API/Requests/GetUnreadCount.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Sources/Lemmy-Swift-Client/Lemmy API/Requests/GetUnreadRegistrationApplicationCount.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
public struct GetUnreadRegistrationApplicationCountRequest: APIRequest { | ||
public typealias Response = GetUnreadRegistrationApplicationCountResponse | ||
|
||
public static let httpMethod: HTTPMethod = .get | ||
public static let path: String = "/admin/registration_application/count" | ||
|
||
public init() {} | ||
} | ||
|
||
public struct GetUnreadRegistrationApplicationCountResponse: APIResponse { | ||
public let registration_applications: Int? | ||
|
||
public init( | ||
registration_applications: Int? = nil | ||
) { | ||
self.registration_applications = registration_applications | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
Sources/Lemmy-Swift-Client/Lemmy API/Requests/LeaveAdmin.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
public struct LeaveAdminRequest: APIRequest { | ||
public typealias Response = GetSiteResponse | ||
|
||
public static let httpMethod: HTTPMethod = .post | ||
public static let path: String = "/user/leave_admin" | ||
|
||
public init() {} | ||
} |
8 changes: 8 additions & 0 deletions
8
Sources/Lemmy-Swift-Client/Lemmy API/Requests/ListLogins.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
public struct ListLoginsRequest: APIRequest { | ||
public typealias Response = LoginToken[] | ||
|
||
public static let httpMethod: HTTPMethod = .get | ||
public static let path: String = "/user/list_logins" | ||
|
||
public init() {} | ||
} |
8 changes: 8 additions & 0 deletions
8
Sources/Lemmy-Swift-Client/Lemmy API/Requests/MarkAllAsRead.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
public struct MarkAllAsReadRequest: APIRequest { | ||
public typealias Response = GetRepliesResponse | ||
|
||
public static let httpMethod: HTTPMethod = .post | ||
public static let path: String = "/user/mark_all_as_read" | ||
|
||
public init() {} | ||
} |
8 changes: 8 additions & 0 deletions
8
Sources/Lemmy-Swift-Client/Lemmy API/Requests/ValidateAuth.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
public struct ValidateAuthRequest: APIRequest { | ||
public typealias Response = SuccessResponse | ||
|
||
public static let httpMethod: HTTPMethod = .get | ||
public static let path: String = "/user/validate_auth" | ||
|
||
public init() {} | ||
} |
11 changes: 0 additions & 11 deletions
11
Sources/Lemmy-Swift-Client/Lemmy API/Structs/BannedPersonsResponse.swift
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
Sources/Lemmy-Swift-Client/Lemmy API/Structs/GenerateTotpSecretResponse.swift
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
Sources/Lemmy-Swift-Client/Lemmy API/Structs/GetCaptchaResponse.swift
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
Sources/Lemmy-Swift-Client/Lemmy API/Structs/GetFederatedInstancesResponse.swift
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
.../Lemmy-Swift-Client/Lemmy API/Structs/GetUnreadRegistrationApplicationCountResponse.swift
This file was deleted.
Oops, something went wrong.