|
1 | | -Toggl Python API |
2 | | -================ |
| 1 | +# Toggl Python API |
3 | 2 |
|
4 | | -    |
| 3 | + [](https://pypi.python.org/pypi/toggl_python) [](https://opensource.org/licenses/MIT) |
5 | 4 |
|
6 | 5 |
|
7 | | -Toggl Python API |
8 | | ----------------- |
9 | | -[<img src="https://evrone.com/logo/evrone-sponsored-logo.png" width=231>](https://evrone.com/?utm_source=github.com) |
10 | | -* Based on open Toggl API documentation: https://github.com/toggl/toggl_api_docs/blob/master/toggl_api.md |
11 | | -* Free software: MIT license |
12 | | -* Documentation: https://toggl-python.readthedocs.io. |
13 | | - |
14 | | - |
15 | | -Installation |
16 | | ------------- |
17 | | -`pip install toggl-python` or use [poetry](https://python-poetry.org) `poetry add toggl-python` |
18 | | - |
19 | | -Usage example |
20 | | -------------- |
21 | | - |
22 | | -Get authenticated user time entries: |
23 | | - |
24 | | -```python |
25 | | -from toggl_python import TokenAuth, TimeEntries |
26 | | - |
27 | | -if __name__ == "__main__": |
28 | | - auth = TokenAuth('AUTH_TOKEN') |
29 | | - print(TimeEntries(auth=auth).list()) |
30 | | -``` |
| 6 | +* Based on open [Toggl API documentation](https://engineering.toggl.com/docs/) |
| 7 | +* [Documentation](https://toggl-python.readthedocs.io) |
31 | 8 |
|
32 | | -Get information about the authenticated user: |
| 9 | +## Warning |
33 | 10 |
|
34 | | -```python |
35 | | -from toggl_python import TokenAuth, Users |
| 11 | +The package is currently broken because it uses **deprecated** Toggl API V8. Migration to V9 is currently in progress. |
36 | 12 |
|
37 | | -if __name__ == "__main__": |
38 | | - auth = TokenAuth('AUTH_TOKEN') |
39 | | - print(Users(auth=auth).me()) |
40 | | -``` |
41 | | - |
42 | | -Get information about authenticated user workspaces: |
43 | | - |
44 | | -```python |
45 | | -from toggl_python import TokenAuth, Workspaces |
46 | | - |
47 | | -if __name__ == "__main__": |
48 | | - auth = TokenAuth('AUTH_TOKEN') |
49 | | - print(Workspaces(auth=auth).list()) |
50 | | -``` |
51 | | - |
52 | | -Credits |
| 13 | +## Credits |
53 | 14 | ------- |
54 | 15 |
|
55 | | -This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template. |
| 16 | +This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template. |
| 17 | + |
| 18 | +[<img src="https://evrone.com/logo/evrone-sponsored-logo.png" width=231>](https://evrone.com/?utm_source=github.com) |
0 commit comments