Skip to content

Commit 2cb5ba4

Browse files
committed
Update OSMLogin.swift
Added documentation for OSMLogin
1 parent 1421f81 commit 2cb5ba4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

GoInfoGame/osmapi/OSMLogin.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,32 @@
66
//
77

88
import Foundation
9+
/// Structure to store the user credentials
910
public struct OSMLogin {
11+
/// user name
1012
let username: String
13+
/// the password
1114
let password: String
1215

13-
// Header information needed
16+
/// Fetches the header information to be added
17+
/// - returns String
1418
func getHeaderData() -> String {
1519
let loginString = "\(username):\(password)"
1620
let loginData = loginString.data(using: String.Encoding.utf8)!
1721
let base64LoginString = loginData.base64EncodedString()
1822
return base64LoginString
1923
}
2024

25+
/// Production credentials
2126
public static var production : OSMLogin {
2227
OSMLogin(username: "[email protected]", password: "$$WentCityErwin")
2328
}
2429

30+
/// Test server credentials
2531
public static var test : OSMLogin {
2632
OSMLogin(username: "[email protected]", password: "a$hwa7hamA") // Need to change
2733
}
28-
34+
/// Dev server credentials
2935
public static var testOSM : OSMLogin {
3036
OSMLogin(username: "[email protected]", password: "d.Dgq6J6aBy.dCJ")
3137
}

0 commit comments

Comments
 (0)