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.

35 lines
884 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. from odoo.addons.component.core import Component
  5. from odoo import _
  6. class PingService(Component):
  7. _inherit = "base.rest.service"
  8. _name = "emc.services"
  9. _usage = "ping" # service_name
  10. _collection = "emc.services"
  11. _description = """
  12. Ping services (test the api)
  13. """
  14. def test(self):
  15. return {"message": _("Called ping on ping API")}
  16. def search(self):
  17. return {"message": _("Called search 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"}}