Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 3.18 KB

File metadata and controls

55 lines (41 loc) · 3.18 KB

⚠️WARNING: This client is deprecated⚠️

The LemonWay API (called Directkit) has two implementations: DirectkitJson2 and DirectkitXml.

The DirectkitJson2 is recommended over the DirectkitXml because It is the simplest and the most network-efficient way.

To call the directkitJson2 in Python: use the fonction post in the package requests to send a POST request.

This tutorial show how simple it is.

Sample codes

import LemonWay
import json

print('---------- Wallet sc: ----------\n')
response = LemonWay.callService(
    'GetWalletDetails', 
    {
        'wallet': 'sc'
    }
)
print(json.dumps(response, indent=4))

See also: LemonWay API documentation / method GetWalletDetails

How to run

After downloading this project (git clone), run:

python GetWalletDetailsExample.py

Out of the box it will call the demo environment. If you have your own test environment. You should fix the configuration in LemonWay.py, put your own environment configuration.

Time to play!

The example is only the basic, you can also play with our API by calling other services. For example:

Note

  • This is only example with basic Python. You should to rewrite your own solution.
  • A good practices is to log any request / response to our service in Development mode.