Skip to content

Instantly share code, notes, and snippets.

@twokul
Last active August 29, 2015 14:20
Show Gist options
  • Save twokul/65f64703bb33107daffe to your computer and use it in GitHub Desktop.
Save twokul/65f64703bb33107daffe to your computer and use it in GitHub Desktop.
reporting

Reports

for today:

  • reports route

  • report route (reports/1)

    • return this.store.find('report', 1)
  • report types (base types + custom ones)

    • what is a type? how do we sub-type?
  • use query params for everything

    • date range
    • filters
  • report

    • reports/1 payload
    {
      "paging": {
        "offset": 0,
        "limit": 20
      },
      "reports": [{
        "id": "1",
        "orderCount": "2134",
        "ticketCount": "20000",
        "orderIds": ["order-1"]
      }],
      "orders": [{
        "id": "order-1",
        "reportId": "1"
      }]
    }
    • what are the other properties?
    • aggregation numbers will come from the server
    • list of defaut properties
    • list of customizable properties
    • has many orders
    • orderCount, ticketCount, etc
    • meta data (pageCount, itemsPerPage)
  • stubbed API calls

    • pagination
      • GET /orders?page=${page}&count=${count}
    • filtering
      • GET /orders?search=${query} (?)
    • endpoints
      • GET /orders
      • GET /orders/${order-id}
      • GET reports/${report-type}
      • POST reports => send type to the server (order, sales)
      • PUT reports/${report-id}
    • authentication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment