Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core endpoint for stats #4

Closed
kasp1 opened this issue Mar 4, 2017 · 1 comment
Closed

Core endpoint for stats #4

kasp1 opened this issue Mar 4, 2017 · 1 comment

Comments

@kasp1
Copy link

kasp1 commented Mar 4, 2017

There should be a way for the UI to retrieve stats from the server side.

It may be an endpoint handler for GET /apiko/stats

Perhaps it would be convenient to put the handler in /src/apiko/stats/get.js in the same way as for example the /src/apiko/core/get.js exists.

This endpoint should also be registered in the core part of server's setup (/src/core.js), extending the endpoints object with for example:

'GET /apiko/core': {
  extendable: false,
  comment: 'Stats data with optional interval parameters. If no interval is set, data for the recent 30 days will be returned.
  handlers: {
    core: './apiko/stats/get'
  },
  params: {
    start: {
      required: false,
      regex: '^\\d+$',
      comment: 'Time interval start for the requested stats as an UNIX timestamp.'
    },
    end: {
      required: false,
      regex: '^\\d+$',
      comment: 'Time interval end for the requested stats as an UNIX timestamp.'
    },
  }
}
@kasp1 kasp1 assigned newset and unassigned newset Mar 5, 2017
kasp1 added a commit that referenced this issue Mar 5, 2017
Added stats core endpoint (issue #4)
@kasp1
Copy link
Author

kasp1 commented Mar 5, 2017

Fixed by #8

@kasp1 kasp1 closed this as completed Mar 5, 2017
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

No branches or pull requests

2 participants