.NET SDK Box.V2.Core v3.25 GetFolderItemsAsync not accepting sort date as parameter

新規投稿

コメント

2件のコメント

  • sgarlanka

    Hello Daren Mooneesawmy,

    Your field parameter "date" is incorrectly passed. You should pass it as a list, so something like below should be passed in for the field parameter.

    new List<string> { "date" }

    0
    コメントアクション パーマリンク
  • Daren Mooneesawmy

    Thank you for your response, I do not think its expecting a list, see the definition below;

    public Task<BoxCollection<BoxItem>> GetFolderItemsAsync(string id, int limit, int offset = 0, IEnumerable<string> fields = null, bool autoPaginate = false, string sort = null, BoxSortDirection? direction = null);

    further investigating the below work with sorting by Name but the BoxSortBy does not contain a date option the closest I found is BoxSortBy.interacted_at but this option throw a bad request error

    var items = await appUserClient.FoldersManager.GetFolderItemsAsync(FolderId, 500,0, responeParam, false, BoxSortBy.Name.ToString(), BoxSortDirection.DESC);

     

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。