Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Tasks by state doesn't work #1

Open
pbehrens opened this issue Apr 6, 2016 · 1 comment
Open

Getting Tasks by state doesn't work #1

pbehrens opened this issue Apr 6, 2016 · 1 comment

Comments

@pbehrens
Copy link

pbehrens commented Apr 6, 2016

Hey there,
Thanks for such a nice API wrapper, it's been nice using it. There was one issue I've found so far.

In the function
tasks($params=array())
The option to send a 'state' parameter is missing. Here is a little workaround for it. There is definitely a more elegant solution, but it works for me. Some value checking and what not could go into it

    public function tasks($params = array())
    {
        $this->expected_class = 'Task';
        $this->action = 'list';
        $endpoint = self::http_api_url.'tasks';
        if(isset($params['state'])){
            $endpoint .= '?state='. $params['state'];
        }

        return $this->request('get', $endpoint, $this->_api_key, $params);
    }
@danielmombourquette
Copy link

So I see that after 4 years this issue is still open, anyone found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants