Created
June 3, 2015 14:25
-
-
Save VictorAlbertos/4a312ccb2f9da5f4b7fb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Foundation | |
import ObjectMapper | |
class News : Mappable { | |
var id: Int! | |
var username : String! | |
var date: String! | |
var share_url: String! | |
var image: String! | |
var title: String! | |
var text: String! | |
required init?(_ map: Map) { | |
mapping(map) | |
} | |
func mapping(map: Map) { | |
id <- map["id"] | |
date <- map["date"] | |
share_url <- map["share_url"] | |
image <- map["image"] | |
title <- map["title"] | |
text <- map["best_friend"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment