0

我有一个类似“ https://podio.com/.../apps/candidates/items/3 ”的链接

如何获得此物品?

在 PHP 中可能是 PodioItem::get_by_app_item_id( $app_id, $app_item_id ); 将工作。但我在 C# 中找不到这种方法。

ItemService.FilterItem 可能有效,但我真的不知道如何使用它..

4

3 回答 3

2

如果该方法不存在,很可能是您没有正确引用您的项目来与 Podio API 进行通信。

// creates a Podio.API.Client used to communicate with the Podio API
var client = Podio.API.Client.ConnectAsUser(client_id, client_secret, username, password);

// Get a single item
int itemId = 123;
var item = client.ItemService.GetItem(itemId);

// Get many items from an app
int appId = 123;
int limit = 100 // Max allowed is 500 items per request;
int offset = 0;
var items = client.ItemService.GetItems(appId, limit, offset);

.NET 的 Podio API 文档

请阅读文档。它告诉您如何读取给定 itemID 的项目。

于 2013-12-25T05:34:19.693 回答
0

Not all Podio API operations have been added to the .NET client. The bottom part of this page tells you how to make custom calls using the rest helper: https://developers.podio.com/clients/dotnet

// creates a Podio.API.Client used to communicate with the Podio API
var client = Podio.API.Client.ConnectAsUser(client_id, client_secret, username, password);

int AppId = 9999;
string requestUrl = Podio.API.Constants.PODIOAPI_BASEURL + "/tag/app/" + AppId + "/";

// request the api
Podio.API.Utils.PodioRestHelper.PodioResponse response = Podio.API.Utils.PodioRestHelper.Request(requestUrl, client.AuthInfo.access_token);

In your specific case: If you really only have a URL you can resolve it into a reference. This will give you the item_id you need to fetch the item itself. See: https://developers.podio.com/doc/reference/resolve-url-66839423

This is the most solid way of turning a URL into a reference. If you have the app_item_id and the app_id you can use https://developers.podio.com/doc/items/get-item-by-app-item-id-66506688 to fetch the item directly.

Neither of those operations have methods in the .NET client and you'll have to use the rest helper to make the calls. Or add the methods yourself, of course.

于 2013-12-30T16:30:51.210 回答
0

请参阅此文档以获取 C#客户端库

示例代码:

var item = podio.ItemService.GetItemBasic(123); // Get item with item_id = 123
于 2017-01-06T05:52:00.473 回答