Skip to content

Commit cb022d1

Browse files
committed
Synchronized rst and markdown docs
With small English fixes. Later on, README.md will have link to the readthedocs rst-generated docs
1 parent 1e9fbfa commit cb022d1

File tree

3 files changed

+49
-8
lines changed

3 files changed

+49
-8
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,7 @@ ENV/
104104
# IDE settings
105105
.vscode/
106106
local_*.py
107-
.idea/
107+
.idea/
108+
109+
# readthedocs sphinx generated documentation
110+
_build/

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Installation
1616
------------
1717
`pip install toggl-python` or use [poetry](https://python-poetry.org) `poetry add toggl-python`
1818

19-
Features
20-
--------
19+
Usage example
20+
-------------
2121

22-
- Get TimeEntries.
22+
Get authenticated user time entries:
2323

2424
```python
2525
from toggl_python import TokenAuth, TimeEntries
@@ -29,7 +29,7 @@ if __name__ == "__main__":
2929
print(TimeEntries(auth=auth).list())
3030
```
3131

32-
- Get toggl User.
32+
Get information about the authenticated user:
3333

3434
```python
3535
from toggl_python import TokenAuth, Users
@@ -39,7 +39,7 @@ if __name__ == "__main__":
3939
print(Users(auth=auth).me())
4040
```
4141

42-
- Get toggl Workspaces.
42+
Get information about authenticated user workspaces:
4343

4444
```python
4545
from toggl_python import TokenAuth, Workspaces
@@ -49,8 +49,6 @@ if __name__ == "__main__":
4949
print(Workspaces(auth=auth).list())
5050
```
5151

52-
* *TODO*
53-
5452
Credits
5553
-------
5654

docs/index.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
11
Toggl Python API
22
================
33

4+
.. image:: https://evrone.com/logo/evrone-sponsored-logo.png
5+
:width: 231
6+
:alt: Sponsored by evrone.com
7+
:target: https://evrone.com/?utm_source=github.com
8+
9+
Based on open `Toggl API documentation <https://github.com/toggl/toggl_api_docs/blob/master/toggl_api.md>`_
10+
411
Installation
512
============
613
`pip install toggl-python` or use `poetry <https://python-poetry.org>`_ `poetry add toggl-python`
14+
15+
Usage example
16+
=============
17+
18+
Get authenticated user time entries:
19+
20+
.. code-block:: python
21+
22+
from toggl_python import TokenAuth, TimeEntries
23+
24+
if __name__ == "__main__":
25+
auth = TokenAuth('AUTH_TOKEN')
26+
print(TimeEntries(auth=auth).list())
27+
28+
Get information about authenticated user:
29+
30+
.. code-block:: python
31+
32+
from toggl_python import TokenAuth, Users
33+
34+
if __name__ == "__main__":
35+
auth = TokenAuth('AUTH_TOKEN')
36+
print(Users(auth=auth).me())
37+
38+
Get information about authenticated user workspaces:
39+
40+
.. code-block:: python
41+
42+
from toggl_python import TokenAuth, Workspaces
43+
44+
if __name__ == "__main__":
45+
auth = TokenAuth('AUTH_TOKEN')
46+
print(Workspaces(auth=auth).list())

0 commit comments

Comments
 (0)