Last active
March 25, 2017 08:02
-
-
Save yuryoparin/d824a62d2cc08a24f397df87937a1b98 to your computer and use it in GitHub Desktop.
Список переменных в адресной книге для ePochta SMS API v3 через bash однострочник
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
key='Публичный ключ'; | |
pr_key='Приватный ключ'; | |
action='getAllAddressBookVariables'; echo -e "key=$key;version=3.0;action=$action;idAddressBook=853365" | \ | |
tr ';' '\n' | \ | |
sort -t'=' -k1 | \ | |
cut -f2 -d'=' | \ | |
paste -s -d';' - | \ | |
sed "s/;//g;s/$/$pr_key/" | \ | |
tr -d '\n' | \ | |
md5 | \ | |
xargs -I {} curl -s -G -d 'idAddressBook=853365' --url "https://api.atompark.com/sms/3.0/$action?key=$key&sum={}" | \ | |
jq '.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment