Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ApiAccount and ApiUser properties publicly accessible #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log.git",
"state" : {
"revision" : "532d8b529501fb73a2455b179e0bbb6d49b652ed",
"version" : "1.5.3"
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
Expand Down
14 changes: 7 additions & 7 deletions Sources/Nakama/Models/ApiAccount.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ import Foundation
/// A user with additional account details. Always the current user.
public struct ApiAccount {
/// The user object.
let user: ApiUser
public let user: ApiUser

/// The custom id in the user's account.
let customId: String
public let customId: String

/// The devices which belong to the user's account.
let devices: [Nakama_Api_AccountDevice]
public let devices: [Nakama_Api_AccountDevice]

/// The UNIX time when the user's account was disabled/banned.
let disableTime: Date
public let disableTime: Date

/// The email address of the user.
let email: String
public let email: String

/// The UNIX time when the user's email was verified.
let VerifyTime: Date
public let VerifyTime: Date

/// The user's wallet data.
let wallet: String
public let wallet: String
}
71 changes: 18 additions & 53 deletions Sources/Nakama/Models/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,57 +18,22 @@ import Foundation

/// A user in the server.
public struct ApiUser {
/// The id of the user's account.
let id: String

/// The Apple Sign In ID in the user's account.
let appleId: String

/// A URL for an avatar image.
let avatarUrl: String

/// The UNIX time when the user was created.
let createTime: Date

/// The display name of the user.
let displayName: String

/// Number of related edges to this user.
let edgeCount: Int

/// The Facebook id in the user's account.
let facebookId: String

/// The Facebook Instant Game ID in the user's account.
let facebookInstantGameId: String

/// The Apple Game Center in of the user's account.
let gamecenterId: String

/// The Google id in the user's account.
let googleId: String

/// The language expected to be a tag which follows the BCP-47 spec.
let langTag: String

/// The location set by the user.
let location: String

/// Additional information stored as a JSON object.
let metadata: String

/// Indicates whether the user is currently online.
let online: Bool

/// The Steam id in the user's account.
let steamId: String

/// The timezone set by the user.
let timezone: String

/// The UNIX time when the user was last updated.
let updateTime: Date

/// The username of the user's account.
let username: String
public let id: String
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@halilkocaerkek Is there a specific reason that the doccomments were removed from the code?

public let appleId: String
public let avatarUrl: String
public let createTime: Date
public let displayName: String
public let edgeCount: Int
public let facebookId: String
public let facebookInstantGameId: String
public let gamecenterId: String
public let googleId: String
public let langTag: String
public let location: String
public let metadata: String
public let online: Bool
public let steamId: String
public let timezone: String
public let updateTime: Date
public let username: String
}