Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/0.18.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SebRut committed Aug 14, 2020
2 parents 8c4f741 + 069330e commit f346bdb
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 161 deletions.
14 changes: 10 additions & 4 deletions CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog

## [v0.18.0](https://github.com/SebRut/pygrocy/tree/v0.18.0) (2020-08-14)

[Full Changelog](https://github.com/SebRut/pygrocy/compare/v0.17.0...v0.18.0)

**Merged pull requests:**

- Add details for tasks [\#114](https://github.com/SebRut/pygrocy/pull/114) ([isabellaalstrom](https://github.com/isabellaalstrom))

## [v0.17.0](https://github.com/SebRut/pygrocy/tree/v0.17.0) (2020-08-14)

[Full Changelog](https://github.com/SebRut/pygrocy/compare/v0.16.0...v0.17.0)
Expand Down Expand Up @@ -28,10 +36,6 @@
- Update coveralls requirement from ~=2.0.0 to ~=2.1.1 [\#104](https://github.com/SebRut/pygrocy/pull/104) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
- Update pdoc3 requirement from ~=0.8.1 to ~=0.8.3 [\#102](https://github.com/SebRut/pygrocy/pull/102) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
- Update responses requirement from ~=0.10.14 to ~=0.10.15 [\#101](https://github.com/SebRut/pygrocy/pull/101) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
<<<<<<< HEAD
- add all fields from chore details api call [\#98](https://github.com/SebRut/pygrocy/pull/98) ([SebRut](https://github.com/SebRut))
=======
>>>>>>> release/0.17.0

## [v0.15.0](https://github.com/SebRut/pygrocy/tree/v0.15.0) (2020-05-25)

Expand All @@ -55,10 +59,12 @@

- upgrade used grocy version [\#100](https://github.com/SebRut/pygrocy/pull/100) ([SebRut](https://github.com/SebRut))
- Feature/91 task api [\#99](https://github.com/SebRut/pygrocy/pull/99) ([SebRut](https://github.com/SebRut))
- add all fields from chore details api call [\#98](https://github.com/SebRut/pygrocy/pull/98) ([SebRut](https://github.com/SebRut))
- finish abstraction from api [\#96](https://github.com/SebRut/pygrocy/pull/96) ([SebRut](https://github.com/SebRut))
- fix travis build [\#93](https://github.com/SebRut/pygrocy/pull/93) ([SebRut](https://github.com/SebRut))
- Update responses requirement from ~=0.10.12 to ~=0.10.14 [\#89](https://github.com/SebRut/pygrocy/pull/89) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
- Update pdoc3 requirement from ~=0.6.4 to ~=0.8.1 [\#88](https://github.com/SebRut/pygrocy/pull/88) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
- Update coveralls requirement from ~=1.11.1 to ~=2.0.0 [\#86](https://github.com/SebRut/pygrocy/pull/86) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
- Fix \#81 [\#82](https://github.com/SebRut/pygrocy/pull/82) ([BlueBlueBlob](https://github.com/BlueBlueBlob))


Expand Down
33 changes: 31 additions & 2 deletions pygrocy/grocy.py
Expand Up @@ -327,6 +327,7 @@ def next_execution_assigned_user(self) -> User:

class Task(DataModel):
def __init__(self, response: TaskResponse):

self._id = response.id
self._name = response.name
self._description = response.description
Expand All @@ -345,6 +346,34 @@ def id(self) -> str:
def name(self) -> str:
return self._name

@property
def description(self) -> str:
return self._description

@property
def due_date(self) -> datetime:
return self._due_date

@property
def done(self) -> int:
return self._done

@property
def done_timestamp(self) -> datetime:
return self._done_timestamp

@property
def category_id(self) -> int:
return self._category_id

@property
def assigned_to_user_id(self) -> int:
return self._assigned_to_user_id

@property
def userfields(self) -> Dict[str, str]:
return self._userfields


class RecipeItem(DataModel):
def __init__(self, response: RecipeDetailsResponse):
Expand Down Expand Up @@ -562,8 +591,8 @@ def tasks(self) -> List[Task]:
raw_tasks = self._api_client.get_tasks()
return [Task(task) for task in raw_tasks]

def complete_task(self, task_id):
return self._api_client.complete_task(task_id)
def complete_task(self, task_id, done_time):
return self._api_client.complete_task(task_id, done_time)

def meal_plan(self, get_details: bool = False) -> List[MealPlanItem]:
raw_meal_plan = self._api_client.get_meal_plan()
Expand Down

0 comments on commit f346bdb

Please sign in to comment.