toJson method
Returns the json representation of this model in the unsplash api.
Implementation
@override
Map<String, dynamic> toJson() {
return <String, dynamic>{
'id': id,
'title': title,
'description': description,
'published_at': publishedAt.toIso8601String(),
'updated_at': updatedAt.toIso8601String(),
'cover_photo': coverPhoto?.toJson(),
'user': user.toJson(),
'featured': featured,
'total_photos': totalPhotos,
'private': private,
'share_key': shareKey,
'links': links.toJson(),
};
}