Skip to content

Commit

Permalink
CI: regenerate [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0q authored and actions-user committed Jul 23, 2024
1 parent 18f595d commit 71bcdb3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Sources/Traq/Models/PatchBotRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public extension TraqAPI {
struct PatchBotRequest: Codable, JSONEncodable, Hashable {
static let displayNameRule = StringRule(minLength: nil, maxLength: 32, pattern: nil)
static let descriptionRule = StringRule(minLength: nil, maxLength: 1000, pattern: nil)
static let bioRule = StringRule(minLength: nil, maxLength: 1000, pattern: nil)
/** BOTユーザー表示名 */
public var displayName: String?
/** BOTの説明 */
Expand All @@ -31,15 +32,18 @@ public extension TraqAPI {
public var developerId: UUID?
/** 購読するイベント */
public var subscribeEvents: [String]?
/** 自己紹介(biography) */
public var bio: String?

public init(displayName: String? = nil, description: String? = nil, privileged: Bool? = nil, mode: BotMode? = nil, endpoint: String? = nil, developerId: UUID? = nil, subscribeEvents: [String]? = nil) {
public init(displayName: String? = nil, description: String? = nil, privileged: Bool? = nil, mode: BotMode? = nil, endpoint: String? = nil, developerId: UUID? = nil, subscribeEvents: [String]? = nil, bio: String? = nil) {
self.displayName = displayName
self.description = description
self.privileged = privileged
self.mode = mode
self.endpoint = endpoint
self.developerId = developerId
self.subscribeEvents = subscribeEvents
self.bio = bio
}

public enum CodingKeys: String, CodingKey, CaseIterable {
Expand All @@ -50,6 +54,7 @@ public extension TraqAPI {
case endpoint
case developerId
case subscribeEvents
case bio
}

// Encodable protocol methods
Expand All @@ -63,6 +68,7 @@ public extension TraqAPI {
try container.encodeIfPresent(endpoint, forKey: .endpoint)
try container.encodeIfPresent(developerId, forKey: .developerId)
try container.encodeIfPresent(subscribeEvents, forKey: .subscribeEvents)
try container.encodeIfPresent(bio, forKey: .bio)
}
}
}
2 changes: 1 addition & 1 deletion docs/BotAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ BOT情報を変更
import Traq

let botId = 987 // UUID | BOTUUID
let patchBotRequest = PatchBotRequest(displayName: "displayName_example", description: "description_example", privileged: false, mode: BotMode(), endpoint: "endpoint_example", developerId: 123, subscribeEvents: ["subscribeEvents_example"]) // PatchBotRequest | (optional)
let patchBotRequest = PatchBotRequest(displayName: "displayName_example", description: "description_example", privileged: false, mode: BotMode(), endpoint: "endpoint_example", developerId: 123, subscribeEvents: ["subscribeEvents_example"], bio: "bio_example") // PatchBotRequest | (optional)

// BOT情報を変更
BotAPI.editBot(botId: botId, patchBotRequest: patchBotRequest) { (response, error) in
Expand Down
1 change: 1 addition & 0 deletions docs/PatchBotRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**endpoint** | **String** | BOTサーバーエンドポイント | [optional]
**developerId** | **UUID** | 移譲先の開発者UUID | [optional]
**subscribeEvents** | **[String]** | 購読するイベント | [optional]
**bio** | **String** | 自己紹介(biography) | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down

0 comments on commit 71bcdb3

Please sign in to comment.