Skip to content

Instantly share code, notes, and snippets.

@brianmichel
Created March 10, 2014 14:27
Show Gist options
  • Save brianmichel/9465916 to your computer and use it in GitHub Desktop.
Save brianmichel/9465916 to your computer and use it in GitHub Desktop.
mantle awesome
+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return [[super JSONKeyPathsByPropertyKey] mtl_dictionaryByAddingEntriesFromDictionary:
@{
@"caption" : @"caption",
@"player" : @"player",
@"plays" : @"plays",
@"albumArtURL" : @"album_art",
@"artist" : @"artist",
@"album" : @"album",
@"trackName" : @"track_name",
@"trackNumber" : @"track_number",
@"year" : @"year"
}];
}
+ (NSValueTransformer *)album_artJSONTransformer {
return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment