Refactor toggl api functions into libtoggl.py