ForumsSearch



Search results for "Posted by jensbn"
Author Message
jensbn

Posted Mar 11, 2016 in: Getting too many deleted tasks (PHP)
Score: 0
  • jensbn
  • Posted: Mar 11, 2016
  • Score: 0
Indeed there was a space. Probably the space turned up in a pasting error, I don't see it in my own code. My current string is pasted below, but still gives deleted tasks with timestamps older than $since. Any other ideas?

$data = $toodledo->getResource("http://api.toodledo.com/3/tasks/deleted.php?access_token=$access_token&after =$since",$access_token);
jensbn

Posted Mar 07, 2016 in: Getting too many deleted tasks (PHP)
Score: 0
  • jensbn
  • Posted: Mar 07, 2016
  • Score: 0
Dear support,

I'm trying to get my application to get deleted tasks from Toodledo (other functionality works). Whenever I do so it gives me every deleted tasks in the past two or so months, regardless of me only requesting tasks more recently deleted. Did I make an error in my code somewhere or is this a problem with Toodledo?

//the relevant part of my code is this
$lastsync=1457099741; //timestamp for a few days ago
if ($data[lastdelete_task] > $lastsync){

$data = $toodledo->getResource("http://api.toodledo.com/3/tasks/deleted.php?access_token=$access_token&after =$lastsync",$access_token);

Regards,

Jens Nielsen
jensbn

Posted Nov 10, 2015 in: Can't get PHP POST to work
Score: 0
  • jensbn
  • Posted: Nov 10, 2015
  • Score: 0
Thanks. It works now. I fixed the variable name by setting it to $access_token in the OAuth2 file. I found another problem too, which may explain the 'forbidden' message. In OAuth2 var $scope = was not set to include 'write'. If you correct the first error in the example code you might want to add a comment at the $scope variable to set it to write if you want full functionality.
jensbn

Posted Nov 07, 2015 in: Can't get PHP POST to work
Score: 0
  • jensbn
  • Posted: Nov 07, 2015
  • Score: 0
Thanks, but hours further, I still can't get it to work. Are you using the same Postresource function as is in the sample in the repository? I wonder if that one is functional at all. Is that verified working?
jensbn

Posted Nov 05, 2015 in: Can't get PHP POST to work
Score: 0
  • jensbn
  • Posted: Nov 05, 2015
  • Score: 0
Thanks. I tried changing the brackets but I still get the error message forbidden. Could it be that I'm somehow not authorized to POST data? That would also explain why it fails when I use minimally modified sample requests from the API playground.
jensbn

Posted Nov 04, 2015 in: Can't get PHP POST to work
Score: 0
  • jensbn
  • Posted: Nov 04, 2015
  • Score: 0
I'd trying to add new tasks using a PHP form. I'm using the sample code from the help (http://api.toodledo.com/3/ ). I can get authentication and GET requests to work, but not POST requests which I need for adding tasks. I've been trying all sorts of things. At best I get the errorcode "Forbidden", but I have no idea why. .

Here's a bit of extra information

If I use the URLs (in adapted form) from the API playground I get the same error.

My post request looks like this in PHP :
$data = $toodledo->postResource("http://api.toodledo.com/3/tasks/add.php",$access_token,'tasks=["title":"TES TADD1"]');

in my modified Oauth file the postResource function gives :
'{"errorCode":2,"errorDesc":"Forbidden","errors":[{"status":"2","message":"Forbidden"}]}'

using the original Oauth2 file the postResource function gives:

'{"errorCode":1,"errorDesc":"No access_token given"}'

This looks to me like an error in the "official" code sample.

For reference, I here post the function I use in the toodledo_oauth2.php sample script:

public function postResource($resource_url,$access_token,$post) {
//original line $url = $resource_url; (added access token)
$url = $resource_url;

//if post is a query string it does a application/x-www-form-urlencoded post
//if post is an array it does a multipart/form-data post
//access_token cannot be in body of multipart post, so we put it in the url in this case
if(is_array($post)) {
$url .= "?access_token=".$this->accessToken;
} else {
$post.= "&access_token=".$this->accessToken;
}

$ci = curl_init();
curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ci, CURLOPT_POST, TRUE);
curl_setopt($ci, CURLOPT_POSTFIELDS, $post);
curl_setopt($ci, CURLOPT_URL, $url);
$response = curl_exec($ci);
curl_close ($ci);

return $response;
}

Hope to get some help!

Regards,

Jens
jensbn

Score: 0
  • jensbn
  • Posted: Oct 14, 2013
  • Score: 0
I find that a lot of traditional applications, and that goes for Toodledo as well, is starting to lag behind in terms of "Smart" functionality that is often becoming the norm on smartphone platforms. You might consider brainstorming of ways to make Toodledo smarter.

One thing I though of was that I'd like to be reminded/warned when certain things happen, such as:

- my number of active projects exceeding 50
- my number of active taskss exceeding 300
- my completion rate exceed 15 tasks a day (smiley!)
- my "inbox" of unprocessed/uncategorized tasks being stale for 3 days
- my percentage of "stale" tasks exceeding x % of total (cleanup time!)
jensbn

Score: 0
  • jensbn
  • Posted: Oct 14, 2013
  • Score: 0
I would love to be able to see more timeline statistics.
For example, I would love to see how the total number of active projects and tasks have changed in the past year. This I see as an indicator of workload.

Also: I'd like to see how my productivity evolves, taken as the number of tasks completed e.g. per month or per day.

Any chance this could be implemented in the future?

-Jens