Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from mludi/master
Browse files Browse the repository at this point in the history
Simple, empty initializer
  • Loading branch information
shial4 authored Apr 16, 2017
2 parents c8df9bd + e24a784 commit c29a5d6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Sources/VaporGCM/GCMPayload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import JSON

///Parameters for gcmPayload messaging by platform
public struct GCMPayload {
// Simple, empty initializer
public init() {}
//Indicates notification title. This field is not visible on iOS phones and tablets.
public var title: String?
//Indicates notification body text.
Expand Down Expand Up @@ -70,3 +72,16 @@ public struct GCMPayload {
return json
}
}

public extension GCMPayload {
public init(message: String) {
self.init()
self.body = message
}

public init(title: String, body: String) {
self.init()
self.title = title
self.body = body
}
}

0 comments on commit c29a5d6

Please sign in to comment.