Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ gstat Public

gstat get an individual business info by the Individual Identification Number (IIN) from "http://old.stat.gov.kz/api". If it registred.

Notifications You must be signed in to change notification settings

mioxin/gstat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gstat

gstat receive an individual business info by the Individual Identification Number (IIN) from "http://old.stat.gov.kz/api". If it registred.

gstat can work in the multithread mode. It use connection pool. The number of concurency connections define -t option. By default the log writen to the file "gstat.log". If defined option -v log otput to the StdOut.

gstat continue work from the last received position after cancel work by emergency.

If request rejected by timeout or statuscode 429 (Too many requests) before next request will be add a wait time 3 sec and each next wait will be increase on 3 sec will repeat 20 once.

Using:

gstat <-h> <-v> <-t N> <-o output_file> <-i input_file>

Flags:

-h, -help:  Show help (Default: false)
-i:         The input file (Default: in.txt)
-o:         The output file (Default: out.json)
-t:         The number of threads (Default: 1)
-v, -verbouse:  Output log to StdOut (Default: false)

Any option have default value.
The input file format is CSV with semicolon separated. The IIN should in 5th position.

The output file is json include data:

Bin             string `json:"bin"`
Name            string `json:"name"`         
RegisterDate    string `json:"registerDate"` 
OkedCode        string `json:"okedCode"`     
OkedName        string `json:"okedName"`     
KrpCode         string `json:"krpCode"`   
KrpName         string `json:"krpName"`   
KrpBfCode       string `json:"krpBfCode"` 
KrpBfName       string `json:"krpBfName"` 
KseCode         string `json:"kseCode"`   
KseName         string `json:"kseName"`   
KatoAddress     string `json:"katoAddress"` 
Fio             string `json:"fio"`         
Ip              bool   `json:"ip"`

About

gstat get an individual business info by the Individual Identification Number (IIN) from "http://old.stat.gov.kz/api". If it registred.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages