-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Api] Added 'Network' and 'Endpoints' dirs
- Loading branch information
1 parent
c380129
commit a41c650
Showing
7 changed files
with
54 additions
and
31 deletions.
There are no files selected for viewing
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
import Foundation | ||
import Alamofire | ||
import PromiseKit | ||
|
||
public protocol NetworkType { | ||
|
||
/// Send network request. | ||
func request(url: URLConvertible, | ||
method: HTTPMethod, | ||
parameters: Parameters?, | ||
encoding: ParameterEncoding, | ||
headers: HTTPHeaders?) -> Promise<Data> | ||
|
||
/// Determine the status of a system's current network configuration and the | ||
/// reachability of a target host. | ||
/// | ||
/// A remote host is considered reachable when a data packet, sent by an | ||
/// application into the network stack, can leave the local device. | ||
/// Reachability does not guarantee that the data packet will actually be | ||
/// received by the host. | ||
func getReachabilityStatus() -> ReachabilityStatus | ||
|
||
/// Show/hide network activity indicator (little circle in the upper left corner). | ||
func setNetworkActivityIndicatorVisibility(isVisible: Bool) | ||
} |
File renamed without changes.