簡體   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