Skip to content

Commit

Permalink
Rerunning autogen on 0.19.0
Browse files Browse the repository at this point in the history
Signed-off-by: Charlie Fish <[email protected]>
  • Loading branch information
fishcharlie committed Mar 23, 2024
1 parent 8289e13 commit ef9322b
Show file tree
Hide file tree
Showing 17 changed files with 148 additions and 59 deletions.
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() {}
}
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
}
}
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 Sources/Lemmy-Swift-Client/Lemmy API/Requests/GetCaptcha.swift
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
}
}
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
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Foundation
public struct GetSiteRequest: APIRequest {
public typealias Response = GetSiteResponse

public struct GetSiteResponse: Codable, Hashable {
public static let httpMethod: HTTPMethod = .get
public static let path: String = "/site"

public init() {}
}

public struct GetSiteResponse: APIResponse {
public let site_view: SiteView?
public let admins: [PersonView]?
public let version: String?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Foundation
public struct GetUnreadCountRequest: APIRequest {
public typealias Response = GetUnreadCountResponse

public struct GetUnreadCountResponse: Codable, Hashable {
public static let httpMethod: HTTPMethod = .get
public static let path: String = "/user/unread_count"

public init() {}
}

public struct GetUnreadCountResponse: APIResponse {
public let replies: Int?
public let mentions: Int?
public let private_messages: Int?
Expand Down
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
}
}
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() {}
}
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() {}
}
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() {}
}
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() {}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit ef9322b

Please sign in to comment.