我不会被要求给你举个例子..但我可以告诉你崩溃应该是什么
雅虎!饲料
{"count":18,"value":{"title":"Academy Theatre","description":"Upcoming Events","link":"http:\/\/pipes.yahoo.com\/pipes\/pipe.info?_id=b551e36fb568c5b2bc4bb088af7bd737","pubDate":"Thu, 12 May 2011 22:09:18 -0700","generator":"http:\/\/pipes.yahoo.com\/pipes\/","callback":"","items":[{"link":"http:\/\/www.brownpapertickets.com\/event\/130787","y:title":"Platinum Championship Wrestling","y:id":{"value":null,"permalink":"true"},"title":"Platinum Championship Wrestling","pubDate":"2011-05-13 20:00:00","description":"The PCW Championship Fridays at 8 P.M. - With the coming of 'Sacred Ground II', will Jay Fury finally wrest the PCW crown? How will the new Tag Team Season progress? Will The Assasins Guild finally make it to the top of the heap? Will The Koncrete Gorillas take over? You have to be there every Friday Night to know for sure!","y:published":{"hour":"3","timezone":"UTC","second":"0","month":"5","minute":"0","utime":"1305342000","day":"14","day_of_week":"6","year":"2011"}},{"link":"http:\/\/www.brownpapertickets.com\/event\/173914","y:title":"\"Ahoy, Pirates and Mermaids\"","y:id":{"value":null,"permalink":"true"},"title":"\"Ahoy, Pirates and Mermaids\"","pubDate":"2011-05-16 09:00:00","description":"Summer Drama Camp (4-7yrs) - June 6-11 from 9:30am-12:30 pm (for early drop off and late pick up options- contact Avondale Playhouse directly). An adventure on the high seas!! We will be exploring age appropriate stories with this theme and dramatizing them with the h
里面有很多信息。它将需要一个插件......像 gcal.js 来处理 Google Calendar XML 提要,因此它知道使用来自 fullcander 的函数方法提取或排序哪些信息并将项目推送到数组。
Json 应该是这样的
首先你需要删除第一部分' {"count":18,"value" ' - 这个信息可能很好,但不适用于 FC
然后它以 ':{"title' 开头,但这应该是第一个字符,应该看起来更像
[{"title":"Acadmeny Theatre","description":"Upcoming Events"
然后是 url、y.title、y.url 之类的内容,而您需要的是 'pubDate',它只需要日期即可。然后它似乎继续做更多的事情
理想情况下,您提供给 FC 的 json 应该如下所示
[{"title":"Acadmeny Theatre","description":"Upcoming Events","Date":"Thu, 12 May 2011 22:09:18 -0700"},{"title":"next Title","description":"MOre InfoEvents","Date":"Thu, 14 May 2011 22:09:18 -0700"}]
FC 将在 12 日和 14 日举办 2 场比赛
FC 文档解释得很好。
这里是关于如何使用 FC 函数从您需要的源构建数组的文档
http://arshaw.com/fullcalendar/docs/event_data/events_function/
这是一个工作演示,该想法有效。你只需要让它处理 Yahoo!饲料。
http://jsfiddle.net/ppumkin/6wE8v/
你想专注于这部分
var event = [];
event.push({
title: 'Garten',
start: '2011-05-10T00:00:00',
allday: true
查看这篇 SO Post,您可以看到用户如何使用 SQL 推送对象 - 您需要对返回的 json 提要执行类似的操作
No Callback after SQLite-Request
这些都是很好的例子。您现在知道如何限制搜索以获取更多信息。