PrasadG193 / covaccine-notifier

CoWIN Vaccine availability notifier for India
Apache License 2.0
62 stars 28 forks source link

Error: json: cannot unmarshal number 32.5 into Go struct field .centers.sessions.available_capacity of type int #1

Closed anjuls closed 3 years ago

anjuls commented 3 years ago

❯ ./covaccine-notifier -c 452001 -a 60 -e a@x.com -p xyz Error: json: cannot unmarshal number 32.5 into Go struct field .centers.sessions.available_capacity of type int Usage: covaccine-notifier [FLAGS] [flags]

Flags: -a, --age int Search appointment for age -d, --district string Search by district name -e, --email string Email address to send notifications -h, --help help for covaccine-notifier -p, --password string Email ID password for auth -c, --pincode string Search by pin code -s, --state string Search by state name

anjuls commented 3 years ago

Above error doesn't come when I pass PINCODE 452018

anjuls commented 3 years ago

it also happens with this

❯ ./covaccine-notifier -s "madhya pradesh" -d indore  -a 45 -e a@x.com -p xyz
Error: json: cannot unmarshal number 37.5 into Go struct field .centers.sessions.available_capacity of type int
Usage:
  covaccine-notifier [FLAGS] [flags]