\n");
131 |
132 | var commentsUrl = Common.BaseUrl + "/comments/";
133 |
134 | foreach (var pair in item.Properties.Where(pair => pair.Key.Contains("id")))
135 | {
136 | commentsUrl += pair.Value;
137 | break;
138 | }
139 |
140 | foreach (var pair in item.Properties)
141 | {
142 | if (!fields.Contains(pair.Key)) continue;
143 |
144 | if (pair.Key.Contains("url"))
145 | sb.Append(" " +
146 | AddWordBreaks(Shorten(pair.Value, 40), 10) + " | \n");
147 | else if (pair.Key.Contains("id"))
148 | sb.Append(" " + pair.Value + " | \n");
149 | else if (pair.Key.Contains("over_18"))
150 | sb.Append("" + (bool.Parse(pair.Value) ? "NSFW" : "No") +
151 | " | \n");
152 | else if (pair.Key.Contains("created_utc"))
153 | sb.Append("" +
154 | new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(
155 | double.Parse(pair.Value)).ToShortDateString() + " | \n");
156 | else if (pair.Key.Contains("title"))
157 | sb.Append(" " + CleanUpValue(pair.Value))
158 | .Append(" | \n");
159 | else
160 | sb.Append("" + CleanUpValue(pair.Value)).Append(" | \n");
161 | }
162 | sb.Append("
\n\n");
163 |
164 | sb.Remove(sb.Length - 1, 1).AppendLine();
165 | rowNum++;
166 | }
167 |
168 | sb.Append("