Tuesday, November 29, 2011

Cardsly QR Image Generator API v0.1.0


Who’s this for?

Do you like png images? Do you like static image API’s like the google static maps API? Do you need to put some QR codes somewhere? (Like a website)
Then you might actually like this. Let me know what you think. (derek@cards.ly, comment below, @elspoono)

Examples

SIMPLE

<img src=”http://cards.ly/qr?http://any-url.com/anywhere” />

STYLIN’

<img src=”http://cards.ly/qr/square?http://any-url.com/anywhere” />
<img src=”http://cards.ly/qr/circle?http://any-url.com/anywhere” />
<img src=”http://cards.ly/qr/round?http://any-url.com/anywhere” />

COLORIN’

<img src=”http://cards.ly/qr/0000FF?http://any-url.com/anywhere” />
<img src=”http://cards.ly/qr/663300/ffffee?http://any-url.com/anywhere” />

Usage Ideas

Include it in a website with
<img src=”http://cards.ly/qr/333333/circle/?http://our-mobile-url.com/” />
Download an image with curl
curl http://cards.ly/qr/000000/00000020/round/?http://bit.ly/something/ -L -o qr.png
Or just visit in a browser and right click > save image as. Simple. Done.

Specification

http://cards.ly/qr/[color1]/[color2]/[style]?[url]
[color1] = Foreground color
[color2] = Background color
Both foreground and background colors can be rgb hex strings such as FFFFFF or rgba hex strings such as FFFFFF80
[style] = Style of qr code
Currently available styles are circle, round and square

0 comments: