-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathPutio.swift
52 lines (39 loc) · 1.28 KB
/
Putio.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
48
49
50
51
52
//
// Putio.swift
// Fetch
//
// Created by Stephen Radford on 11/09/2015.
// Copyright © 2015 Cocoon Development Ltd. All rights reserved.
//
import Foundation
import KeychainAccess
#if os(iOS)
import RealmSwift
#endif
public class Putio {
/// The reference to the Put.io API
public static let api = "https://api.put.io/v2/"
/// The client ID used to authenticate with Put.io
public static let clientId = 2023
/// The keychain we're using
public static let keychain = Keychain(service: "uk.co.wearecocoon.fetch")
#if os(iOS)
/// The shared realm instance
public static let realm = try! Realm()
#endif
/// The access token stored in keychain after we logged in
public static var accessToken: String? {
get {
return keychain["access_token"]
}
}
public static let sharedInstance = Putio()
public var delegate: PutioDelegate?
public static let secret = "1E6p8Mlh9PfGrtZH0UUNArC252FX74FO"
public static let accent = UIColor(red:0.98, green:0.77, blue:0.21, alpha:1)
public class func networkActivityIndicatorVisible(yn: Bool) {
#if os(iOS)
UIApplication.sharedApplication().networkActivityIndicatorVisible = yn
#endif
}
}