Skip to content

Add --json flag to all commands (Issue #1)#49

Open
Guaiyu11 wants to merge 1 commit intoApexOpsStudio:mainfrom
Guaiyu11:feature/json-output
Open

Add --json flag to all commands (Issue #1)#49
Guaiyu11 wants to merge 1 commit intoApexOpsStudio:mainfrom
Guaiyu11:feature/json-output

Conversation

@Guaiyu11
Copy link
Copy Markdown

Summary

Adds --json flag to add, list, done commands.

Changes

  • task.py: --json arg on all subparsers
  • commands/*.py: JSON output when flag passed

JSON Format

// list --json
{"success": true, "tasks": [{"id": 1, "description": "...", "done": false}]}

// add --json
{"success": true, "task_id": 1, "description": "..."}

// done --json
{"success": true, "task_id": 1, "description": "..."}

Closes #1
/claim #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --json output format

1 participant