获取应用程序或空间的所有项目数据

本文关键字:项目 项目数 数据 应用程序 空间 获取 | 更新日期: 2023-09-27 18:07:04

我们在每个工作区都有一个名为"可交付成果"的应用程序(大约有20多个工作区)。这些可交付成果中的每一项都包含若干项。用来检索的最佳API是什么?

  1. 所有工作区的所有可交付成果
  2. 所有可交付成果项下的所有项目,来自所有工作区

谢谢

获取应用程序或空间的所有项目数据

另一种示例
-获取所有用户可以访问的应用程序
-循环应用程序和获取项目(也不要忘记处理偏移和限制)


文档使用:https://developers.podio.com/doc/applications/get-all-apps-5902728https://developers.podio.com/doc/items/filter项目- 4496747

对不起,但是示例是Ruby而不是c#。主要思想将保持不变,不依赖于所使用的编程语言:)

begin
  Podio.client.authenticate_with_credentials(login, password)
  apps = Podio::Application.find_all_for_current_user({'text' => 'Deliverables'})
  apps.select! {|app| app.name == 'Deliverables'}                 # select only full name match
  apps.select! {|app| app.status == 'active'}                     # filter out inactive (archived) apps
  options = {'limit' => 30, 'offset' => 0}
  filter = {:last_edit_on => {:from => '-7d', :to => '+0d'}}      # as example, work with most recent items only
  apps.each do |app|
    puts "Working with app: '#{app.config['name']}' from workspace_id #{app.space_id}"
    all_found_items = []
    result = Podio::Item.find_by_filter_values(app.app_id, filter, options)
    puts "Found #{result.count} items matching filter #{filter}"
    all_found_items += result.all
    while all_found_items.length < result.count
      options['offset'] = all_found_items.length
      result = Podio::Item.find_by_filter_values(app.app_id, filter, options)
      all_found_items += result.all
    end
    all_found_items.each_with_index do |item, i|
      puts "'t#{i+1}: #{item.title}"
    end
  end
rescue Podio::PodioError => ex
  puts ex
end
  1. 获取所有组织
    https://developers.podio.com/doc/organizations/get-organizations-22344这将为您提供与该用户关联的所有组织id。选择要处理的组织id,或者在循环中使用所有组织id

  2. 获取所有工作区
    https://developers.podio.com/doc/spaces/get-list-of-organization-workspaces-238875316将返回特定ORG_ID

  3. 的工作空间列表。
  4. 遍历工作区获取应用程序
    https://developers.podio.com/doc/applications/get -应用- - org标签空间——标签-和-应用-标签- 91708386

  5. 从应用程序中获取项目
    https://developers.podio.com/doc/items/filter-items-4496747将最终为您提供应用程序中的项目(再次需要在循环中)

您还可以尝试其他方法:
*获取所有用户可以访问的应用程序
https://developers.podio.com/doc/applications/get -所有程序- 5902728
*遍历应用程序并获取项目
https://developers.podio.com/doc/items/filter项目- 4496747

首先获取所有工作区,并获取每个工作区的所有应用程序。然后你可以使用ItemService。在Podio c#客户端库中使用FilterItems方法来获取App中的所有项目。