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

import Foundation

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

17
extension AMIVApiEvents: EndPointType {
domenicw's avatar
domenicw committed
18
19
20
21
22
23
24
25
26
27
    
    public var path: String {
        switch self {
        case .events:
            return "events"
        }
    }
    
    public var httpMethod: HTTPMethod {
        switch self {
28
        case .events:
domenicw's avatar
domenicw committed
29
30
31
32
33
34
            return .get
        }
    }
    
    public var task: HTTPTask {
        switch self {
35
        case .events:
domenicw's avatar
domenicw committed
36
37
38
39
40
41
            return .request
        }
    }
    
    public var headers: HTTPHeaders? {
        switch self {
42
        case .events:
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 .events:
            return false
        }
    }
    
domenicw's avatar
domenicw committed
54
}