dwaring87 / rtm-api

Remember the Milk API Interface
MIT License
6 stars 5 forks source link

user.get('rtm.tasks.getList', params, function(err, resp)) not working normally with params #3

Closed allenliu1030 closed 5 years ago

allenliu1030 commented 5 years ago

I have tried to use this method to get a taskseries and then filter out all the uncompleted tasks in that list.

I am trying the below nodejs code:

    let params = {
        list_id: "42777480",
        taskseries_id: "361846324",
        completed: ""
    };

    currUser.get('rtm.tasks.getList', params, function(err, resp){
        if (err) {
            return console.log(err.toString());
        }
        console.log(resp);

        var jsonStr = JSON.stringify(resp);
        console.log(jsonStr);
    });

But I got all the lists under the list_id 42777480, the other params still not working. Could you let me know how to use this API to achieve detail filters?

It's really critical for me. Please take a look asap.

Thanks!

Allen

dwaring87 commented 5 years ago

Sorry I didn't see this sooner. If you haven't gotten it working yet, take a look at the rtm.tasks.getList method documentation here: https://www.rememberthemilk.com/services/api/methods/rtm.tasks.getList.rtm

list_id is a valid method parameter. However, taskseries_id and completed are not parameters for this method. If you want to do further filtering on the returned list of tasks, you'll want to use the filter parameter which uses the RTM's Advanced Search syntax: https://www.rememberthemilk.com/help/?ctx=basics.search.advanced