-
-
Save squarefrog/a1b9bdf7e5b74a034bf26197673c34b3 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 AmigoHelper: Codable { | |
var username: String? = nil | |
var name: String? = nil | |
var userID: String? = nil | |
var email: String? = nil | |
//var customData: Array<Any>? = nil | |
init (username: String? = nil, | |
name: String? = nil, | |
userID: String? = nil, | |
email: String? = nil | |
//customData: Array<Any>? = 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