Skip to content
This repository was archived by the owner on Jun 23, 2020. It is now read-only.

No way to pass sorting parameters to listing calls #10

@dlopuch

Description

@dlopuch

Lets say I want to list cases: http://dev.desk.com/API/cases/#list

I don't believe there is a (public) way to specify parameters like sort_field or sort_direction.

If you're searching, you can pass them like Desk.cases().search({sort_direction: 'desc', ...}).exec(...);, but I don't believe you can do it if you're just listing resources.

A work-around appears to use the internal _queryParams() function, ie:

var listCases = Desk.cases();
listCases._queryParams({sort_field: ..., sort_direction: 'desc'});
listCases.exec(....);

But this uses an ugly private function and doesn't have function chaining.

Did I miss a cleaner way of doing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions