-
Notifications
You must be signed in to change notification settings - Fork 49
/
NetworkAPI.swift
47 lines (37 loc) · 1.21 KB
/
NetworkAPI.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// NetworkAPI.swift
// RxNetworks
//
// Created by Condy on 2021/10/5.
// https://github.com/yangKJ/RxNetworks
///`Moya`文档
/// https://github.com/Moya/Moya
///
///`Alamofire`文档
/// https://github.com/Alamofire/Alamofire
///
import Moya
public protocol NetworkAPI: Moya.TargetType {
/// Request host
var ip: APIHost { get }
/// Request parameters
var parameters: APIParameters? { get }
/// Plugin array
var plugins: APIPlugins { get }
/// Whether to go test data
var stubBehavior: APIStubBehavior { get }
/// Failed retry count, the default is zero
var retry: APINumber { get }
/// Identification key prefix, defaul MD5 request link.
var keyPrefix: String { get }
/// Default false.
var httpShouldHandleCookies: Bool { get }
/// A responsible for returning an `EndpointSampleResponse`.
var sampleResponse: Moya.EndpointSampleResponse { get }
/// Mapped to json, Default is true.
var mapped2JSON: Bool { get }
/// Remove all HUDs displayed to `LevelStatusBarWindowController`.
func removeHUD()
/// Remove displaying in the window`BoomingSetup.loadingPluginNames` loading.
func removeLoading()
}