如何在 Google Calendar api 上将内容类型设置为 html?
因此,阅读 google calendar api (php) 文档,其中指出:
“...content,使用 setContent 设置,提供有关从 Google 日历中请求事件详细信息时出现的事件的附加信息。可选地, 描述的 mime -type 是使用 setType 设置来指定 HTML 而不是纯文本"
我已经尝试解决这个问题很长时间了,但我不知道如何将内容设置为 html 而不是 plan。文本。我尝试在 Zend_Gdata_Calendar 对象上使用 setType 方法,但它说该方法不存在。有什么想法吗?
So reading the google calendar api (php) documentation it states:
"...content, set using setContent, provides additional information about the event which appears when the event details are requested from within Google Calendar. Optionally, the description's mime-type is set using setType to specify HTML instead of plain text. "
I've been trying to figure this out for a really long time but i have no idea how to go about setting the content to html instead of plan text. I tried using the setType method, on Zend_Gdata_Calendar object, but it said the method doesn't exist. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 API 中,有一个部分讨论“创建 Web 内容事件”。这显示了设置类型的示例,该类型只是 MIME 类型。对于 HTML,您可以将类型设置为“text/html”,然后提供 HTML 的链接。
Data API 开发人员指南:PHP
通过阅读,我相信这一点将创建一个显示您的内容的 iFrame。我在 .NET 中对此进行了很多尝试,它似乎很有效。我希望这对你有帮助。
In the API there is a section that talks about "Creating web content events." That shows an example of setting the type, which is just a MIME type. For HTML, you can set the type as "text/html" and then provide the link to the HTML.
Data API Developer's Guide: PHP
From reading it, I believe this will create an iFrame that shows your content. I've been playing around with this a lot in .NET and it seems to work. I hope this helps you.