-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from OpenStack-mobile/develop
v2.0.0
- Loading branch information
Showing
861 changed files
with
26,714 additions
and
24,775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
github "PureSwift/SwiftFoundation" "Swift.2.2" | ||
github "realm/realm-cocoa" | ||
github "OpenStack-Mobile/aerogear-ios-http" "master" | ||
github "OpenStack-Mobile/aerogear-ios-oauth2" "openstack" | ||
github "icanzilb/SwiftSpinner" "master" | ||
github "xmartlabs/XLPagerTabStrip" ~> 5.0 | ||
github "ColemanCDA/SWRevealViewController" "master" | ||
github "mac-cain13/R.swift.Library" | ||
github "OpenStack-Mobile/HanekeSwift" "master" | ||
github "ColemanCDA/KTCenterFlowLayout" "master" | ||
github "ColemanCDA/AFHorizontalDayPicker" "master" | ||
github "marketplacer/Cosmos" "1.2.3" | ||
github "ColemanCDA/AHKActionSheet" "master" | ||
github "ColemanCDA/MLPAutoCompleteTextField" "master" | ||
github "ColemanCDA/AMTagListView" "master" | ||
github "ColemanCDA/ImageSlideshow" "master" | ||
github "ParsePlatform/Parse-SDK-iOS-OSX" | ||
github "0xced/XCDYouTubeKit" | ||
github "mysterioustrousers/MTDates" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
github "ColemanCDA/AHKActionSheet" "cb0b1c48d6c218dcf638b9c0f6398483091b5f37" | ||
github "ColemanCDA/AMTagListView" "d335570b72c7f2a5661f41e73154d07fa7385be7" | ||
github "BoltsFramework/Bolts-ObjC" "1.8.4" | ||
github "marketplacer/Cosmos" "1.2.3" | ||
github "OpenStack-Mobile/HanekeSwift" "d4fc957878c85bfa30802f37367180cf2bf76b07" | ||
github "ColemanCDA/ImageSlideshow" "9f0a29b69b02fa3bb34cf42a560e718dd7731493" | ||
github "PureSwift/JSON-C" "cb04249de9ed23ecc5e3ea772a4c6c46f86b3d86" | ||
github "ColemanCDA/KTCenterFlowLayout" "603f33180563cfa4fcab99a0623bbde21e49665b" | ||
github "ColemanCDA/MLPAutoCompleteTextField" "a0664c0e1d1225ce846f1e2be3c54d5eee214d13" | ||
github "mysterioustrousers/MTDates" "1.0.3" | ||
github "ColemanCDA/MTDates" "def729947a5f07d6440ce9b97f2761af299bc13c" | ||
github "mac-cain13/R.swift.Library" "v2.3.0" | ||
github "ColemanCDA/SWRevealViewController" "c3113e1508597ee2d9ea7081d97caa5117dddf00" | ||
github "icanzilb/SwiftSpinner" "43228a8b6552f918a74046ce190ed4e4c5c21b77" | ||
github "0xced/XCDYouTubeKit" "2.5.3" | ||
github "xmartlabs/XLPagerTabStrip" "5.0.0" | ||
github "OpenStack-Mobile/aerogear-ios-http" "702fc6fd2c3bd52a4a2e0daca54e291a9ae440d3" | ||
github "realm/realm-cocoa" "v1.0.2" | ||
github "ColemanCDA/AFHorizontalDayPicker" "290e3cf7b14ab872203e38f9ff6d4f3d839661a7" | ||
github "ParsePlatform/Parse-SDK-iOS-OSX" "1.14.2" | ||
github "PureSwift/SwiftFoundation" "30f3f6e17a8644447b7e1fd26dad997f4999c548" | ||
github "OpenStack-Mobile/aerogear-ios-oauth2" "eed684cd43881d0ce4029984ee5a35e61202526a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Copyright 2016 The OpenStack Foundation | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.developer.associated-domains</key> | ||
<array> | ||
<string>applinks:dev-openstack.org-site</string> | ||
</array> | ||
</dict> | ||
</plist> |
57 changes: 57 additions & 0 deletions
57
OpenStack Summit/CoreSummit/AttendeesForTicketOrderRequest.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// AttendeesForTicketOrderRequest.swift | ||
// OpenStack Summit | ||
// | ||
// Created by Alsey Coleman Miller on 8/3/16. | ||
// Copyright © 2016 OpenStack. All rights reserved. | ||
// | ||
|
||
import SwiftFoundation | ||
import RealmSwift | ||
import AeroGearHttp | ||
import AeroGearOAuth2 | ||
|
||
public extension Store { | ||
|
||
func attendees(for ticketOrder: String, summit: Identifier? = nil, completion: (ErrorValue<[NonConfirmedSummitAttendee]>) -> ()) { | ||
|
||
let summitID: String | ||
|
||
if let identifier = summit { | ||
|
||
summitID = "\(identifier)" | ||
|
||
} else { | ||
|
||
summitID = "current" | ||
} | ||
|
||
let URI = "/api/v1/summits/" + summitID + "/external-orders/" + ticketOrder | ||
|
||
let URL = environment.configuration.serverURL + URI | ||
|
||
let http = self.createHTTP(.OpenIDGetFormUrlEncoded) | ||
|
||
http.GET(URL, parameters: nil, completionHandler: { (responseObject, error) in | ||
|
||
// forward error | ||
guard error == nil | ||
else { completion(.Error(error!)); return } | ||
|
||
guard let json = JSON.Value(string: responseObject as! String) | ||
else { completion(.Error(Error.InvalidResponse)); return } | ||
|
||
guard let attendeesJSONArray = json.objectValue?["attendees"]?.arrayValue | ||
else { completion(.Value([])); return } | ||
|
||
guard let attendees = NonConfirmedSummitAttendee.fromJSON(attendeesJSONArray) | ||
else { completion(.Error(Error.InvalidResponse)); return } | ||
|
||
// cache | ||
//try! self.realm.write { let _ = attendees.save(self.realm) } | ||
|
||
// success | ||
completion(.Value(attendees)) | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// CollectionType.swift | ||
// OpenStack Summit | ||
// | ||
// Created by Alsey Coleman Miller on 9/2/16. | ||
// Copyright © 2016 OpenStack. All rights reserved. | ||
// | ||
|
||
public extension CollectionType { | ||
|
||
func firstMatching(@noescape predicate: (Self.Generator.Element) throws -> Bool) rethrows -> Self.Generator.Element? { | ||
|
||
guard let index = try self.indexOf(predicate) | ||
else { return nil } | ||
|
||
return self[index] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// Company.swift | ||
// OpenStackSummit | ||
// | ||
// Created by Alsey Coleman Miller on 6/1/16. | ||
// Copyright © 2016 OpenStack. All rights reserved. | ||
// | ||
|
||
public struct Company: Named { | ||
|
||
public let identifier: Identifier | ||
|
||
public var name: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// CompanyJSON.swift | ||
// OpenStackSummit | ||
// | ||
// Created by Alsey Coleman Miller on 6/1/16. | ||
// Copyright © 2016 OpenStack. All rights reserved. | ||
// | ||
|
||
import SwiftFoundation | ||
|
||
public extension Company { | ||
|
||
enum JSONKey: String { | ||
|
||
case id, name | ||
} | ||
} | ||
|
||
extension Company: JSONDecodable { | ||
|
||
public init?(JSONValue: JSON.Value) { | ||
|
||
guard let JSONObject = JSONValue.objectValue, | ||
let identifier = JSONObject[JSONKey.id.rawValue]?.rawValue as? Int, | ||
let name = JSONObject[JSONKey.name.rawValue]?.rawValue as? String | ||
else { return nil } | ||
|
||
self.identifier = identifier | ||
self.name = name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// Config.swift | ||
// OpenStack Summit | ||
// | ||
// Created by Alsey Coleman Miller on 7/28/16. | ||
// Copyright © 2016 OpenStack. All rights reserved. | ||
// | ||
|
||
/// OpenStack Summit constants. | ||
public protocol Configuration { | ||
|
||
/// URL of the REST server | ||
static var serverURL: String { get } | ||
|
||
/// URL of the OpenStack ID server. | ||
static var authenticationURL: String { get } | ||
|
||
static var openID: (client: String, secret: String) { get } | ||
|
||
static var serviceAccount: (client: String, secret: String) { get } | ||
|
||
/// OpenStack Summit Webpage URL. | ||
static var webpageURL: String { get } | ||
} | ||
|
||
public extension Environment { | ||
|
||
var configuration: Configuration.Type { | ||
|
||
switch self { | ||
case .Staging: return CoreSummit.Staging.self | ||
case .Production: return CoreSummit.Production.self | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// CoreSummit.h | ||
// CoreSummit | ||
// | ||
// Created by Alsey Coleman Miller on 5/31/16. | ||
// Copyright © 2016 OpenStack. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
//! Project version number for CoreSummit. | ||
FOUNDATION_EXPORT double CoreSummitVersionNumber; | ||
|
||
//! Project version string for CoreSummit. | ||
FOUNDATION_EXPORT const unsigned char CoreSummitVersionString[]; | ||
|
Oops, something went wrong.