Recherche de API tryton

bonjour cher tous ,
je travaille sur un projet qui consiste a creer un client gnu health sur mobile .
j’aimerais savoir comment trouver les API de tryton

The easiest way I’ve found is to watch the tryton client sao network activities to understand how methods are being called and such, as well as reading the source code.

Tryton uses RPC with XML or JSON, and creates read, write, delete methods automatically for each model.

Another way is to create user_application to create own api.

Est-ce que le but est d’offrir toutes les possibilités qu’offre un client Tryton ou d’exposer juste quelques écrans pour un encodage plus facile.

Dans le premier cas, sache qu’il a existé un client pour android développé par BioEcoForest, j’en ai retrouvé la trace là:

C’est assez vieux et non maintenu mais ça pourrait t’aider.
Mais bon à choisir, je pense qu’il vaut mieux rendre le client web encore meilleur au niveau ‘responsive’ que de partir dans un développement pareil.

Par contre si tu veux plutôt faire des écrans spécifiques, alors tu peux voir tryton comme un serveur web classique (la couche web étant werkzeug), sur lequel tu peux créer ton application. La solution que suggère @fmorato est une solution qui permet de gérer l’identification de l’utilisateur. Plus d’info dans la doc:

http://doc.tryton.org/projects/server/en/latest/topics/user_application.html

There is also the RPC call: system.listMethods and system.methodHelp but it is probably no as easy as reading the code.
The available methods for RPC are declared on each object in the attribute __rpc__.

I try to connect to methodHelp [1] and I think are a mistake because “request.rpc_method” is “system.methodHelp” [2] and not the object that like to get doc (example: model.party.party.search).

IMHO is missing a parameter in methodHelp to pass the model to get the getdoc.

What do you think or how to call methodHelp?

[1] trytond/trytond/protocols/dispatcher.py at develop · tryton/trytond · GitHub
[2] trytond/trytond/protocols/dispatcher.py at develop · tryton/trytond · GitHub

Indeed as this method comes from XML-RPC, it should take a parameter containing the RPC method name.

    <methodCall>
  <methodName>system.methodHelp</methodName>
  <params>
    <param><value>
      <string>sample.add</string>
      </value></param>
    </params>
  </methodCall>

Ok, but I think the mistake is get model from request.rpc_method [2] and not the parameter.

Example to call:

data = {'method': 'system.listMethods', 'params': []} # ok
data = {'method': 'system.methodHelp', 'params': ['model.party.party.search']} # ko because 

[2] trytond/trytond/protocols/dispatcher.py at develop · tryton/trytond · GitHub