'Define route.'

def _route(self):

    self._app.route('/', method='GET', callback=self._index)
    self._app.route('/<refresh_time:int>', method=['GET'], callback=self._index)
    self._app.route('/api/2/config', method='GET', callback=self._api_config)
    self._app.route('/api/2/config/<item>', method='GET', callback=self._api_config_item)
    self._app.route('/api/2/args', method='GET', callback=self._api_args)
    self._app.route('/api/2/args/<item>', method='GET', callback=self._api_args_item)
    self._app.route('/api/2/help', method='GET', callback=self._api_help)
    self._app.route('/api/2/pluginslist', method='GET', callback=self._api_plugins)
    self._app.route('/api/2/all', method='GET', callback=self._api_all)
    self._app.route('/api/2/all/limits', method='GET', callback=self._api_all_limits)
    self._app.route('/api/2/all/views', method='GET', callback=self._api_all_views)
    self._app.route('/api/2/<plugin>', method='GET', callback=self._api)
    self._app.route('/api/2/<plugin>/history', method='GET', callback=self._api_history)
    self._app.route('/api/2/<plugin>/history/<nb:int>', method='GET', callback=self._api_history)
    self._app.route('/api/2/<plugin>/limits', method='GET', callback=self._api_limits)
    self._app.route('/api/2/<plugin>/views', method='GET', callback=self._api_views)
    self._app.route('/api/2/<plugin>/<item>', method='GET', callback=self._api_item)
    self._app.route('/api/2/<plugin>/<item>/history', method='GET', callback=self._api_item_history)
    self._app.route('/api/2/<plugin>/<item>/history/<nb:int>', method='GET', callback=self._api_item_history)
    self._app.route('/api/2/<plugin>/<item>/<value>', method='GET', callback=self._api_value)
    self._app.route('/<filepath:path>', method='GET', callback=self._resource)
