Skip to content

Instantly share code, notes, and snippets.

@delagoya
Last active December 10, 2015 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delagoya/4496848 to your computer and use it in GitHub Desktop.
Save delagoya/4496848 to your computer and use it in GitHub Desktop.
example pidler
# 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