You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
904 B

  1. # Copyright 2020 Coop IT Easy SCRL fs
  2. # Robin Keunen <robin@coopiteasy.be>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. # pylint: disable=consider-merging-classes-inherited
  5. from odoo import _
  6. from odoo.addons.component.core import Component
  7. class PingService(Component):
  8. _inherit = "emc.rest.service"
  9. _name = "emc.services"
  10. _usage = "ping" # service_name
  11. _description = """
  12. Ping services (test the api)
  13. """
  14. def search(self):
  15. return {"message": _("Called search on ping API")}
  16. def test(self):
  17. return {"message": _("Called ping on ping API")}
  18. def _validator_test(self):
  19. return {}
  20. def _validator_return_test(self):
  21. return {"message": {"type": "string"}}
  22. def _validator_search(self):
  23. return {}
  24. def _validator_return_search(self):
  25. return {"message": {"type": "string"}}