AMIVApiStudyDocuments.swift 957 Bytes
Newer Older
domenicw's avatar
domenicw committed
1
//
2
//  AMIVApiStudyDocuments.swift
domenicw's avatar
domenicw committed
3
4
//  Amiv
//
5
//  Created by Domenic Wüthrich on 10.10.18.
domenicw's avatar
domenicw committed
6
7
8
9
10
//  Copyright © 2018 Amiv an der ETH. All rights reserved.
//

import Foundation

11
public enum AMIVApiStudyDocuments {
domenicw's avatar
domenicw committed
12
    
13
    case overview
domenicw's avatar
domenicw committed
14
15
16
    
}

17
extension AMIVApiStudyDocuments: EndPointType {
domenicw's avatar
domenicw committed
18
19
20
    
    public var path: String {
        switch self {
21
22
        case .overview:
            return "studydocuments"
domenicw's avatar
domenicw committed
23
24
25
26
27
        }
    }
    
    public var httpMethod: HTTPMethod {
        switch self {
28
        case .overview:
domenicw's avatar
domenicw committed
29
30
31
32
33
34
            return .get
        }
    }
    
    public var task: HTTPTask {
        switch self {
35
        case .overview:
domenicw's avatar
domenicw committed
36
37
38
39
40
41
            return .request
        }
    }
    
    public var headers: HTTPHeaders? {
        switch self {
42
        case .overview:
domenicw's avatar
domenicw committed
43
44
45
46
            return nil
        }
    }
    
47
48
49
50
51
52
53
    public var isAuthenticationRequired: Bool {
        switch self {
        case .overview:
            return true
        }
    }
    
domenicw's avatar
domenicw committed
54
}