Sha256: 2e1d64824923e268eed084350defa95ba232f831f7059a557a8b619ccedb31fa

Contents?: true

Size: 567 Bytes

Versions: 1

Compression:

Stored size: 567 Bytes

Contents

#   source ./tmp/test_env
resource=$1
action=$2
start=$3

if [ -z "$MS_LOGIN" ] || [ -z "$MS_PASSWORD" ]; then
  echo "Утсановите переменные окружения MS_LOGIN и MS_PASSWORD"
  exit 1
fi

if [ -z "$resource" ]; then
  echo "Запуск: rest.sh Resoruce [action]"
  echo "Например: rest.sh Feature list"
  exit 2
fi

url="https://online.moysklad.ru/exchange/rest/ms/xml/$1/$2"

if [ "$action"=="list" ] && [ -n "$start" ]; then
  url="$url?start=$start"
fi

echo $url >&2
curl --max-redirs 3 -is -u $MS_LOGIN:$MS_PASSWORD $url

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amo_crm-0.2.2 scripts/rest.sh