【问题标题】:How do I get the Podio app item name found in App Settings?如何获取在应用设置中找到的 Podio 应用项目名称?
【发布时间】:2019-05-25 22:03:18
【问题描述】:

如何在 C# 中获取这张图片中的 App Item 名称?

【问题讨论】:

    标签: c# podio


    【解决方案1】:

    你看过Podio API吗?

    应用程序:获取应用程序

    GET /app/{app_id}
    

    获取应用的定义,可以包括配置和字段。此方法将始终返回应用定义的最新版本。

    结果(微结果):

    {
      "app_id": The id of the app,
      "name": The name of the app,
      "item_name": The name of each item in an app,
      "icon": The name of the icon used to represent the app
    }
    

    您只需使用HttpClient 发出一个简单的REST 请求或开始使用Podio-dotnet NUGET package。

    using PodioAPI;
    
    var podio = new Podio(clientId, clientSecret);
    podio.AuthenticateWithApp(appId, appSecret);
    
    var application = await podio.ApplicationService.GetApp(appId, "micro");
    

    ItemName 可以通过application.ItemName 访问。

    更多信息,这是GetApp方法的签名。

    /// <summary>
    ///     Gets the definition of an app and can include configuration and fields.
    ///     <para>Podio API Reference: https://developers.podio.com/doc/applications/get-app-22349 </para>
    /// </summary>
    /// <param name="appId"></param>
    /// <param name="view">
    ///     The type of the view of the app requested. Can be either "full", "short", "mini" or "micro". Default
    ///     value: full
    /// </param>
    /// <param name="fields">
    ///     This parameter can be used to include more or less content in responses than the defaults provided by Podio.
    ///     E.g. space.view(full)
    /// </param>
    /// <returns></returns>
    public async Task<Application> GetApp(int appId, string view = "full", string fields = null)
    

    如果您需要了解Application 类还有哪些其他字段,请查看其source。

    【讨论】:

    • 谢谢!我一直在查看项目级别而不是应用程序。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-26
    相关资源
    最近更新 更多