Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Commit

Permalink
Also update filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcook committed Jun 5, 2017
1 parent 61691ee commit e7ae99c
Show file tree
Hide file tree
Showing 33 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions MixerAPI.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = "MixerAPI"
s.version = "1.6"
s.version = "1.6.1"
s.summary = "An interface to communicate with Mixer's backend."
s.homepage = "https://github.com/mixer/mixer-client-swift"
s.license = "MIT"
s.author = { "Jack Cook" => "jack@mixer.com" }

s.requires_arc = true
s.ios.deployment_target = "8.2"
s.source = { :git => "https://github.com/mixer/mixer-client-swift.git", :tag => "1.6" }
s.source = { :git => "https://github.com/mixer/mixer-client-swift.git", :tag => "1.6.1" }
s.source_files = "Pod/Classes/**/*"

s.dependency "Starscream", "~> 2.0"
Expand Down
2 changes: 1 addition & 1 deletion Pod/Classes/Models/Constellation/ConstellationPacket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ open class ConstellationPacket {
}
}
case "reply":
packet = ConstellationReplyPacket(result: json["result"].dictionaryObject as? [String: AnyObject], error: json["error"].dictionary, id: json["id"].int ?? 0)
packet = ConstellationReplyPacket(result: json["result"].dictionaryObject, error: json["error"].dictionary, id: json["id"].int ?? 0)
default:
print("Unrecognized constellation packet received: \(json)")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class ConstellationReplyPacket: ConstellationPacket {
public let id: Int

/// The result of the sent packet.
public let result: [String: AnyObject]?
public let result: [String: Any]?

/// Any errors that occurred in response to the sent packet.
public let error: ConstellationReplyError?

/// Initializes a reply packet with JSON data.
init(result: [String: AnyObject]?, error: [String: JSON]?, id: Int) {
init(result: [String: Any]?, error: [String: JSON]?, id: Int) {
if let code = error?["code"]?.int, let message = error?["message"]?.string {
self.error = ConstellationReplyError(code: code, message: message)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class InteractiveHandshakePacket: InteractivePacket, InteractiveSendable
public func data() -> [String: AnyObject] {
var data = [String: AnyObject]()

data["id"] = id as AnyObject ?? NSNull()
data["key"] = key as AnyObject ?? NSNull()
data["id"] = id as AnyObject
data["key"] = key as AnyObject

return data
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public struct MixerNotification {

/// Used to initialize a notification given JSON data.
init(json: JSON) {
payload = json["payload"].dictionaryObject as? [String: AnyObject]
payload = json["payload"].dictionaryObject
sentAt = Date.fromMixer(json["sentAt"].string)
type = json["type"].string ?? "unknown"
userId = json["userId"].int ?? 0
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public struct MixerUser {
public let groups: [MixerGroup]?

/// The user's preferences. Only retrieved if this is the authenticated user's object.
public let preferences: [String: AnyObject]?
public let preferences: [String: Any]?

/// The user's Twitter profile URL.
public let twitter: String?
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions Pod/Classes/Routes/UsersRoutes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ public class UsersRoutes {
:param: id The id of the user whose preferences are being retrieved.
:param: completion An optional completion block with retrieved preferences data.
*/
public func getPreferences(_ id: Int, completion: ((_ preferences: [String: AnyObject]?, _ error: MixerRequestError?) -> Void)?) {
public func getPreferences(_ id: Int, completion: ((_ preferences: [String: Any]?, _ error: MixerRequestError?) -> Void)?) {
MixerRequest.request("/users/\(id)/preferences") { (json, error) in
guard let preferences = json?.dictionaryObject as? [String: AnyObject] else {
guard let preferences = json?.dictionaryObject else {
completion?(nil, error)
return
}
Expand Down

0 comments on commit e7ae99c

Please sign in to comment.