skip2 / go-qrcode

:sparkles: QR Code encoder (Go)
http://go-qrcode.appspot.com
MIT License
2.58k stars 335 forks source link

Using go-qrcode as REST-API #66

Open tranmh opened 4 months ago

tranmh commented 4 months ago

Hi,

it would be great, if you can accept my pull request and bring this small REST-API to the main code. For the moment it is written in a very simple manner, but it is of course possible to extend to the way you want it.

For the moment I prefer to use the same REST-API parameters like: https://goqr.me/api/doc/create-qr-code/ and will extend it to a certain need. Obviously the mentioned REST-API is not open source like this.

Thx.

tranmh commented 4 months ago

Example query:

        $url =
                'http://localhost:6868/api/qrcode?data='.
                $data_to_qrcode.
                '&size='.$options['size'].
                '&color='.$options['foreground'].
                '&bgcolor='.$options['background'].
                '&ecc='.$options['errorCorrectionLevel'];