@@ -37,6 +37,9 @@ public struct Attachment {
3737 public let fields : [ AttachmentField ] ?
3838 public let imageURL : String ?
3939 public let thumbURL : String ?
40+ public let footer : String ?
41+ public let footerIcon : String ?
42+ public let ts : Int ?
4043
4144 internal init ( attachment: [ String : AnyObject ] ? ) {
4245 fallback = attachment ? [ " fallback " ] as? String
@@ -50,10 +53,13 @@ public struct Attachment {
5053 text = attachment ? [ " text " ] as? String
5154 imageURL = attachment ? [ " image_url " ] as? String
5255 thumbURL = attachment ? [ " thumb_url " ] as? String
56+ footer = attachment ? [ " footer " ] as? String
57+ footerIcon = attachment ? [ " footer_icon " ] as? String
58+ ts = attachment ? [ " ts " ] as? Int
5359 fields = ( attachment ? [ " fields " ] as? [ [ String : AnyObject ] ] ) ? . map { AttachmentField ( field: $0) }
5460 }
5561
56- public init ( fallback: String , title: String , colorHex: String ? = nil , pretext: String ? = nil , authorName: String ? = nil , authorLink: String ? = nil , authorIcon: String ? = nil , titleLink: String ? = nil , text: String ? = nil , fields: [ AttachmentField ] ? = nil , imageURL: String ? = nil , thumbURL: String ? = nil ) {
62+ public init ( fallback: String , title: String , colorHex: String ? = nil , pretext: String ? = nil , authorName: String ? = nil , authorLink: String ? = nil , authorIcon: String ? = nil , titleLink: String ? = nil , text: String ? = nil , fields: [ AttachmentField ] ? = nil , imageURL: String ? = nil , thumbURL: String ? = nil , footer : String ? = nil , footerIcon : String ? = nil , ts : Int ? = nil ) {
5763 self . fallback = fallback
5864 self . color = colorHex
5965 self . pretext = pretext
@@ -66,6 +72,9 @@ public struct Attachment {
6672 self . fields = fields
6773 self . imageURL = imageURL
6874 self . thumbURL = thumbURL
75+ self . footer = footer
76+ self . footerIcon = footerIcon
77+ self . ts = ts
6978 }
7079
7180 internal func dictionary( ) -> [ String : AnyObject ] {
@@ -82,6 +91,9 @@ public struct Attachment {
8291 attachment [ " fields " ] = fieldJSONArray ( fields)
8392 attachment [ " image_url " ] = imageURL
8493 attachment [ " thumb_url " ] = thumbURL
94+ attachment [ " footer " ] = footer
95+ attachment [ " footer_icon " ] = footerIcon
96+ attachment [ " ts " ] = ts
8597 return attachment
8698 }
8799
0 commit comments