AMIVApiJobs.swift 842 Bytes
Newer Older
domenicw's avatar
domenicw committed
1
//
2
//  AMIVApiJobs.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 AMIVApiJobs: EndPointType {
domenicw's avatar
domenicw committed
12
13
14
15
16
    
    case jobs
    
}

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