Fixed reference to "items" property in JSON

pull/10111/head
anurse 11 years ago
parent 087c71ad37
commit fc8e3ad269

@ -36,7 +36,7 @@ protected override async Task<CollectorCursor> Fetch(CollectorHttpClient client,
JToken context = null;
root.TryGetValue("@context", out context);
IEnumerable<JToken> rootItems = root["item"].OrderBy(item => item["commitTimestamp"].ToObject<DateTime>());
IEnumerable<JToken> rootItems = root["items"].OrderBy(item => item["commitTimestamp"].ToObject<DateTime>());
foreach (JObject rootItem in rootItems)
{
@ -47,7 +47,7 @@ protected override async Task<CollectorCursor> Fetch(CollectorHttpClient client,
Uri pageUri = rootItem["url"].ToObject<Uri>();
JObject page = await client.GetJObjectAsync(pageUri);
IEnumerable<JToken> pageItems = page["item"].OrderBy(item => item["commitTimestamp"].ToObject<DateTime>());
IEnumerable<JToken> pageItems = page["items"].OrderBy(item => item["commitTimestamp"].ToObject<DateTime>());
foreach (JObject pageItem in pageItems)
{

@ -28,7 +28,7 @@ protected override async Task<CollectorCursor> Fetch(CollectorHttpClient client,
List<Task<JObject>> tasks = new List<Task<JObject>>();
foreach (JObject rootItem in root["item"])
foreach (JObject rootItem in root["items"])
{
DateTime pageTimeStamp = rootItem["commitTimestamp"].ToObject<DateTime>();

@ -24,7 +24,7 @@ public async Task Test0Async()
string indexJson = await client.GetStringAsync(address);
JObject indexObj = JObject.Parse(indexJson);
foreach (JToken indexItem in indexObj["item"])
foreach (JToken indexItem in indexObj["items"])
{
DateTime indexItemTimeStamp = indexItem["commitTimestamp"].ToObject<DateTime>();
@ -33,7 +33,7 @@ public async Task Test0Async()
string pageJson = await client.GetStringAsync(indexItem["url"].ToObject<Uri>());
JObject pageObj = JObject.Parse(pageJson);
foreach (JToken pageItem in pageObj["item"])
foreach (JToken pageItem in pageObj["items"])
{
DateTime pageItemTimeStamp = pageItem["commitTimestamp"].ToObject<DateTime>();

Loading…
Cancel
Save