2015-10-07 39 views
0

當方法僅將數據結果默認爲100時,是否可以從我的組織獲取所有工作表? https://smartsheet-platform.github.io/api-docs/?csharp#list-all-org-sheets如何使用SmartSheet API獲取組織中列出的所有圖紙?

// Set the Access Token 
Token token = new Token(); 
token.AccessToken = System.Configuration.ConfigurationManager.AppSettings["ss-token"].ToString(); 

// Using the Smartsheet builder to create a Smartsheet 
SmartsheetClient smartsheet = new SmartsheetBuilder().SetAccessToken(token.AccessToken).Build(); 
var orgList = smartsheet 
    .UserResources // Gets All Org Sheets 
    .SheetResources 
    .ListSheets(); // no overloads for this method 

回答

1

看起來你已經發現用C#SDK的錯誤。即方法smartsheet.UserResources.SheetResources.ListSheets()應該使您能夠指定一個輸入參數,以便將?includeAll=true查詢字符串參數/值添加到請求URL中。不幸的是,它看起來並沒有在SDK中實現此功能。

如果您非常喜歡,可以從GitHub下載SDK源代碼並修改該源代碼以添加此功能。爲獲得「列出所有組織表」操作,以返回單個響應的所有結果的請求網址:

https://api.smartsheet.com/2.0/users/sheets?includeAll=true

(我做了筆記這個錯誤,這樣我們就可以在解決這個問題SDK的未來更新 - 時限TBD。同時,如果您最終自己修復它,請通過GitHub提交拉取請求,以便其他人也可以從您的修復中受益。)

相關問題