ZadapiWindows client to access Zadarma API.
Before you begin, get the two codes (key and secret) in your personal area and write them to a file zadapi.ini.
The client is ready. You can execute API commands.
Example 1. Get Balance.
prints the balance
Example 2. Sending SMS
Zadapi ZADARMA:POST/v1/sms/send/ number=38095XXXXXXX message="Hello World!"
send a message to the number.
Similarly, you can run any API command.
The program returns the server response code, or an error number. Therefore, 200 means a successful, you can use it in your scripts.
For example, cmd file with the code:
gets the current statistics of calls. If success, opens excel to view the statistics. Otherwise, displays an error message.
zadapi GET/v1/statistics/format=xml > curstat.xml @IF %ERRORLEVEL% EQU 200 (START excel curstat.xml) ELSE (echo Error #%ERRORLEVEL% occurred!)
Zadapi is freeware, including commercial use. Decompile, or make changes, is not allowed.