/// <summary> /// Serializes a given match in it's own folder /// </summary> /// <param name="rec"></param> public static void SerializeRecommendation(RecModel rec) { string workingDir = WorkingDir + DIR_RECS + rec.ToString() + "\\"; // Rec doesn't have his own data folder if (!Directory.Exists(workingDir)) { CreateMatchFolder(workingDir); } DownloadPhotos(rec.Photos, workingDir); DownloadInstagramPhotos(rec.Instagram, workingDir); File.WriteAllText(workingDir + rec.Name.Unidecode() + EXT, JsonConvert.SerializeObject(rec, Formatting.Indented)); }
/// <summary> /// Moves photos of recommendation from "Pending recommendations" to "Matches" directory /// </summary> /// <param name="rec"></param> public static bool MoveRecFromPendingToMatches(RecModel rec) { return(MoveRecPhotosToMatches(rec.ToString(), DIR_RECS_PENDING)); }
public static bool MoveRecToMatches(RecModel rec) { return(MoveRecPhotosToMatches(rec.ToString(), DIR_RECS)); }