 import Foundation
 import JSON
 
-class Payload: JSONRepresentable {
+public class Payload: JSONRepresentable {
     /// The number to display as the badge of the app icon.
     var badge: Int?
     

    // Any extra key-value pairs to add to the JSON
    var extra: [String: NodeRepresentable] = [:]
    
    

    func makeJSON() throws -> JSON {
        var payloadData: [String: NodeRepresentable] = [:]
        var apsPayloadData: [String: NodeRepresentable] = [:]
        


extension Payload {
    convenience init(message: String) {
        self.init()
        self.body = message
    }
    
    convenience init(title: String, body: String) {
        self.init()
        self.title = title
        self.body = body
    }
    
    convenience init(title: String, body: String, badge: Int) {
        self.init()
        self.title = title
        self.body = body
        self.badge = badge
    }
    
    
    /// A simple, already made, Content-Available payload
    static var contentAvailable: Payload = {
        let payload = Payload()
        payload.contentAvailable = true
        return payload
    }()
}
