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.

37 lines
938 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 = "base.rest.service"
  9. _name = "emc.services"
  10. _usage = "ping" # service_name
  11. _collection = "emc.services"
  12. _description = """
  13. Ping services (test the api)
  14. """
  15. def search(self):
  16. return {"message": _("Called search on ping API")}
  17. def test(self):
  18. return {"message": _("Called ping on ping API")}
  19. def _validator_test(self):
  20. return {}
  21. def _validator_return_test(self):
  22. return {"message": {"type": "string"}}
  23. def _validator_search(self):
  24. return {}
  25. def _validator_return_search(self):
  26. return {"message": {"type": "string"}}