繁体   English   中英

设置 applicationName 配置

[英]Set applicationName configuration

我想使用 Java 代码连接到 Google 协作平台 API:

SitesService client = new SitesService("yourCo-yourAppName-v1<NOT KNOWN WHAT TO SET HERE>");
        client.setUserCredentials("<MY GMAIL ACCOUNT -EMAIL>", "MY GMAIL ACCOUNT -PASSWORD");

        SiteFeed siteFeed = client.getFeed(new URL("https://sites.google.com/feeds/site/site/"), SiteFeed.class);
        for (SiteEntry entry : siteFeed.getEntries()){
            System.out.println("title: " + entry.getTitle().getPlainText());
            System.out.println("site name: " + entry.getSiteName().getValue());
            System.out.println("theme: " + entry.getTheme().getValue());
            System.out.println("");
        }

根据文档: The applicationName argument should follow the format: company-applicationname-version. This parameter is used for logging purposes. The applicationName argument should follow the format: company-applicationname-version. This parameter is used for logging purposes. 我需要设置company-applicationname但我没有配置公司名称和应用程序名称。

你能指导我吗?

参考: https://developers.google.com/sites/docs/1.0/developers_guide_java

它是一个字符串。 你已经添加了任何你喜欢的东西。 您应该添加公司名称+应用程序名称+版本信息来标识您的唯一应用程序,但如果您没有任何内容,可以添加任何可以唯一标识您的应用程序的名称。

我的建议是您的 {email name}{app name}v{number}。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM