-
-
Save squarefrog/16555b29826d7ff111ca192db7e295d8 to your computer and use it in GitHub Desktop.
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
struct CustomData: Codable { | |
} | |
struct AmigoHelper: Codable { | |
var username: String? = nil | |
var name: String? = nil | |
var userID: String? = nil | |
var email: String? = nil | |
var customData: [CustomData]? = nil | |
init (username: String? = nil, | |
name: String? = nil, | |
userID: String? = nil, | |
email: String? = nil, | |
customData: Array<CustomData>? = nil | |
) { | |
self.username = username | |
self.name = name | |
self.userID = userID | |
self.email = email | |
self.customData = customData | |
} | |
func updateData () { | |
let encoder = JSONEncoder() | |
let data = try! encoder.encode(self) | |
print(String(data: data, encoding: .utf8)!) | |
} | |
func getData () { | |
print("Get Data") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment