code: def api(self):
          
          functions = [x[0]for x in inspect.getmembers(self, predicate=inspect.ismethod)
                       if not x[0].startswith('_')]
  
          full_api = {
              'doc': u"When posting data you have to use the JSON format.",
              'api': []
          }
          my_daemon_type = "%s" % getattr(self.app, 'type', 'unknown')
          my_address = getattr(self.app, 'host_name', getattr(self.app, 'name', 'unknown'))
          if getattr(self.app, 'address', '127.0.0.1') not in ['127.0.0.1']:
              # If an address is explicitely specified, I must use it!
              my_address = self.app.address
          for fun in functions:
              endpoint = {
                  'daemon': my_daemon_type,
                  'name': fun,
                  'doc': getattr(self, fun).__doc__,
                  'uri': '%s://%s:%s/%s' % (getattr(self.app, 'scheme', 'http'),
                                            my_address,
                                            self.app.port, fun),
                  'args': {}
              }
  
              try:
                  spec = inspect.getfullargspec(getattr(self, fun))
              except Exception:  # pylint: disable=broad-except
                  # pylint: disable=deprecated-method
                  spec = inspect.getargspec(getattr(self, fun))
              args = [a for a in spec.args if a not in ('self', 'cls')]
              if spec.defaults:
                  a_dict = dict(list(zip(args, spec.defaults)))
              else:
                  a_dict = dict(list(zip(args, ("No default value",) * len(args))))
  
              endpoint["args"] = a_dict
              full_api['api'].append(endpoint)
  
          return full_api
docs: List the methods available on the daemon Web service interface
  
          :return: a list of methods and parameters
          :rtype: dict