Board Thread:The Quarters - Q & A/@comment-95.88.135.221-20161029075549

Hi there,

I'm trying to use Habitica for logging and rewarding myself for completing pool (billiards) practice drills. So far I have only this:

Example Daily: work on a drill for at least 10 times, every other day.

which is simple enough, but doesn't take into account how well (or bad) I did. So I can be sloppy and just put in minimal effort, and still get rewarded.

So I would like to reward or penalize myself based on how well I actually performed when I did those 10 attempts at a certain drill. More specific, let's say in a single attempt at a drill, I can score between 0 and 10 points. I would like the result of each attempt to either give me XP, or cost me HP, depending on how well I've performed.

My idea was to create a +/- habit "Drill #1", and use the API to change the difficulty of the task (from trivial to hard) and hit +/- depending on how many our of 10 points I made.

Examples:

0/10: (bad performance, large penalty)  change habit difficulty to hard, and hit -

4/10: change habit difficulty to "trivial" and hit -

6/ 10: change habit difficulty to "trivial" and hit +

10/10 - (great performance, large reward) change habit difficulty to hard, and hit +

But I'm really lost on how to do that with the API. In fact, I'm lost on how to do anything with the API, I simply don't understand it (or HTTP APIs in general). So I thought I just use some examples to get going, but I cannot even get this one http://habitica.wikia.com/wiki/Thread:16466 to work ({"success":false,"error":"NotFound","message":"Not found."}, and yes - correct api-user, api-key and v3).

Are there any examples or code snippets available for

1) Getting all habits in a single JSON string and save them to disk

2) Sending a particular habit (after I've edited the difficulty) back to the server

3) Clicking +/- for this particular task

?

Thanks in advance,

Fritz 