【问题标题】:**How to add gadget to google calendar programmatically through java?****如何通过java以编程方式将小工具添加到谷歌日历?**
【发布时间】:2013-05-27 13:07:09
【问题描述】:

我知道我可以像这样通过java将“事件”添加到谷歌日历

--->client.events().insert(calendar.getId(), event).execute();

同样,有没有办法将小工具添加到日历中? 我找不到与小工具相关的 javadoc 信息。如果您让我知道与小工具相关的 javadoc,那将非常有帮助。

注意:我不想使用 GData,我希望通过“Google Calendar API v3”使用它。

【问题讨论】:

    标签: google-gadget


    【解决方案1】:

    您可以使用此示例进行操作(它不完整,但我想这已经足够了):

    Gadget g = new Gadget();
    g.setLink("https://gwt.googleusercontent.com/samples/hellogadgets-1.2.1/hellogadgets/HelloGadgets.gadget.xml");
    g.setIconLink("https://www.google.com/favicon.ico");
    g.setTitle("DateTime Gadget (a classic!)");
    g.setType("application/x-google-gadgets+xml");
    g.setDisplay("chip");
    g.setWidth(300);
    g.setHeight(136);
    
    e.setGadget(g);
    

    【讨论】:

      猜你喜欢
      • 2011-09-14
      • 2012-12-08
      • 2017-09-25
      • 1970-01-01
      • 1970-01-01
      • 2012-08-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多