Skip to content

Commit

Permalink
fix V2Member decode
Browse files Browse the repository at this point in the history
  • Loading branch information
isaced committed Sep 29, 2022
1 parent 03be9a2 commit d7c426a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Sources/V2exAPI/Models/V2Member.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,28 @@ public struct V2Member : Decodable {
public var created: Int?
public var lastModified: Int?

public init(id: Int? = nil, username: String? = nil, url: String? = nil, website: String? = nil, twitter: String? = nil, psn: String? = nil, github: String? = nil, btc: String? = nil, location: String? = nil, tagline: String? = nil, bio: String? = nil, avatar: String? = nil, avatarMini: String? = nil, avatarNormal: String? = nil, avatarLarge: String? = nil, created: Int? = nil, lastModified: Int? = nil) {
self.id = id
self.username = username
self.url = url
self.website = website
self.twitter = twitter
self.psn = psn
self.github = github
self.btc = btc
self.location = location
self.tagline = tagline
self.bio = bio
self.avatar = avatar
self.avatarMini = avatarMini
self.avatarNormal = avatarNormal
self.avatarLarge = avatarLarge
self.created = created
self.lastModified = lastModified
}

enum CodingKeys: String, CodingKey {
case id, username, url, website, twitter, psn, github, btc, location, tagline, bio, created
case id, username, url, website, twitter, psn, github, btc, location, tagline, bio, created, avatar
case avatarMini = "avatar_mini"
case avatarNormal = "avatar_normal"
case avatarLarge = "avatar_large"
Expand Down

0 comments on commit d7c426a

Please sign in to comment.