Last active
December 10, 2015 21:39
-
-
Save delagoya/4496848 to your computer and use it in GitHub Desktop.
example pidler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# request a single barcode as JSON | |
curl http://pidler.org/bc | |
curl http://pidler.org/bc.json | |
# => {"barcodes":["PA6A24"]} | |
# request 3 barcodes as JSON | |
curl http://pidler.org/bc?num=3 | |
curl http://pidler.org/bc.json?num=3 | |
# => {"barcodes":["P5D1EE","PB80CB","PC70A2"]} | |
# request 3 barcodes as XML | |
curl http://pidler.org/bc.xml?num=3 | |
# => <?xml version="1.0" encoding="UTF-8" ?> | |
# => <barcodes> | |
# => <barcode>P3FAC6</barcode> | |
# => <barcode>P19B3E</barcode> | |
# => <barcode>P69918</barcode> | |
# => </barcodes> | |
# request 30 barcodes as a CSV file | |
curl --output my_3_barcodes.csv http://pidler.org/bc.csv?num=30 | |
more my_3_barcodes.csv | |
# => "Barcode" | |
# => "P7848E" | |
# => "P61672" | |
# => ... | |
# => "P5B58E" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment