Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
fixed potential error before tasks are loaded first time
  • Loading branch information
RedRem95 committed Mar 27, 2024
1 parent 6474781 commit b1c05a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ For this endpoint you can use a combination of header and query parameters to cu
| Authorization | yes | One of the authorization keys you generated and put in the auth.json file |

### Parameters
| Key | Required | Description |
|---------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| token | yes | One of the authorization keys you generated and put in the auth.json file |
| date_types | no | Comma seperated list of the dates in the events you want to have in your calendar. For example `Due Date`. If you want to include a date from a custom field put two underscores infront of the name of the custom field, for example `__your_custom_field_with_a_date`. Defaults to all dates found in all events |
| only_assigned | no | Allowed values are `true` and `false`. If false all dates will be added to your calendar. If not only the one for the user associated with the access key in auth.json are published into the calendar. Default is `true` |

| Key | Required | Description |
|----------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| token | yes | One of the authorization keys you generated and put in the auth.json file |
| date_types | no | Comma seperated list of the dates in the events you want to have in your calendar. For example `Due Date`. If you want to include a date from a custom field put two underscores infront of the name of the custom field, for example `__your_custom_field_with_a_date`. Defaults to all dates found in all events |
| only_assigned | no | Allowed values are `true` and `false`. If false all dates will be added to your calendar. If not only the one for the user associated with the access key in auth.json are published into the calendar. Default is `true` |
| include_closed | no | Allowed values are `true` and `false`. If true closed tasks will be included. Default is `false` |

An example query could look like this:
```http request
Expand Down
4 changes: 2 additions & 2 deletions clickup_to_ical/web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def date_type_filter(_dt_name) -> bool:

if request.args.get("only_assigned", "true").lower() in TRUE_VALUES:
log["assignees"] = clickup_user_id
assigned_tasks = tasks[clickup_user_id]
assigned_tasks = tasks.get(clickup_user_id, [])
else:
log["assignees"] = "all"
assigned_tasks = tasks[None]
assigned_tasks = tasks.get(None, [])

include_closed = request.args.get("include_closed", "false") in TRUE_VALUES
log["closed included"] = include_closed
Expand Down

0 comments on commit b1c05a6

Please sign in to comment.