-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
149 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/chart/balance/balance: | ||
get: | ||
tags: | ||
- charts | ||
summary: A chart that contains spent/earned amounts | ||
description: | | ||
The chart contains spent/earned amounts for the given date range, grouped by the given period, and collected for the given accounts. | ||
operationId: getBalanceChart | ||
parameters: | ||
!correlationParameter,3 | ||
!mandatoryDateRangeParameters,3 | ||
- in: query | ||
name: accounts[] | ||
allowReserved: true | ||
description: | | ||
An array of accounts that should be included. Example: accounts[]=1&accounts[]=2. | ||
required: true | ||
style: form | ||
explode: true | ||
schema: | ||
type: array | ||
items: | ||
type: integer | ||
format: int32 | ||
- in: query | ||
name: period | ||
description: The period by which the results must be grouped. | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/PeriodProperty' | ||
- in: query | ||
name: preselected | ||
description: The accounts Firefly III must include in this chart. If you do not select any accounts in the accounts[] parameter, this parameter is used. This parameter overrules the accounts[] parameter. | ||
required: false | ||
schema: | ||
$ref: '#/components/schemas/PreselectedAccountProperty' | ||
responses: | ||
!unauthenticatedResponse,3 | ||
!notFoundResponse,3 | ||
!badRequestResponse,3 | ||
!internalExceptionResponse,3 | ||
200: | ||
description: Chart information. Check out the model for more details. Each main entry is a set of data. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ChartLine' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ChartDataPoint: | ||
type: object | ||
properties: | ||
key: | ||
type: string | ||
format: string | ||
example: "value" | ||
description: "The key is the label of the value, so for example: '2018-01-01' => 13 or 'Groceries' => -123. For date-related charts, this is always a Atom date." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
ChartDataSet: | ||
type: object | ||
properties: | ||
label: | ||
type: string | ||
format: string | ||
example: "earned-EUR" | ||
description: "This is the label of the current data-set. It can refer to an object by name, or a collected set of data." | ||
currency_id: | ||
type: string | ||
format: string | ||
example: "5" | ||
description: "The currency ID of the currency associated to the data in the entries." | ||
currency_code: | ||
type: string | ||
format: string | ||
example: "EUR" | ||
currency_symbol: | ||
type: string | ||
format: string | ||
example: "$" | ||
currency_decimal_places: | ||
type: integer | ||
format: int32 | ||
example: 2 | ||
description: "Number of decimals for the currency associated to the data in the entries." | ||
native_currency_id: | ||
type: string | ||
format: string | ||
example: "5" | ||
description: "The currency ID of the user's native (default) currency." | ||
native_currency_code: | ||
type: string | ||
format: string | ||
example: "EUR" | ||
description: "The currency code of the user's native (default) currency." | ||
native_currency_symbol: | ||
type: string | ||
format: string | ||
example: "$" | ||
description: "The currency symbol of the user's native (default) currency." | ||
native_currency_decimal_places: | ||
type: integer | ||
format: int32 | ||
example: 2 | ||
description: "Number of decimals for the native (default) currency of the user." | ||
start: | ||
type: string | ||
format: date-time | ||
example: "2018-09-17T12:46:47+01:00" | ||
description: "Holds the date and time of start of the range of data collected. It could be there was no data for this point in time, but this is the start of the requested range." | ||
end: | ||
type: string | ||
format: date-time | ||
example: "2018-09-17T12:46:47+01:00" | ||
description: "Holds the date and time of END of the range of data collected. It could be there was no data for this point in time, but this is the end of the requested range." | ||
period: | ||
$ref: '#/components/schemas/PeriodProperty' | ||
entries: | ||
type: object | ||
description: "The actual entries for this data set. They 'key' value is the label for the data point. The value is the actual (numerical) value." | ||
items: | ||
$ref: '#/components/schemas/ChartDataPoint' | ||
native_entries: | ||
type: object | ||
description: "The entries for this data set converted to the user's native (default) currency. They 'key' value is the label for the data point. The value is the actual (numerical) value." | ||
items: | ||
$ref: '#/components/schemas/ChartDataPoint' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ChartLine: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/ChartDataSet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
PeriodProperty: | ||
type: string | ||
format: string | ||
example: "1M" | ||
description: "This field denotes the period in which the chart data is split up. If the period is not relevant, because the chart is not time-based, it will be NULL." | ||
nullable: true | ||
enum: | ||
- 1D | ||
- 1W | ||
- 1M | ||
- 3M | ||
- 6M | ||
- 1Y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PreselectedAccountProperty: | ||
type: string | ||
enum: | ||
- all | ||
- assets | ||
- liabilities |