Skip to content

Commit

Permalink
move checkCredentials to StudentVue
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMoonThatRises committed Aug 20, 2024
1 parent a2fca9a commit 03ea48e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/StudentVue/SOAPApi/StudentVueApi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public class StudentVueApi {
/// - Throws: `Error` some other error has occured when api request was sent
///
/// - Returns: Success or not
public func checkCredentials() async throws -> Bool {
internal func checkCredentials() async throws -> Bool {
do {
_ = try await xmlServiceRequest(methodName: .getSoundFileData)

Expand Down
9 changes: 9 additions & 0 deletions Sources/StudentVue/StudentVue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,13 @@ public class StudentVue {
self.api.updateCredentials(domain: domain, username: username, password: password)
self.scraper.updateCredentials(domain: domain, username: username, password: password)
}

/// Checks validity of user credentials quickly
///
/// - Throws: `Error` some other error has occured when api request was sent
///
/// - Returns: Success or not
public func checkCredentials() async throws -> Bool {
return try await api.checkCredentials()
}
}

0 comments on commit 03ea48e

Please sign in to comment.