michaeldelorenzo/gnippy — pull request #2 by jonathankeebler (2014-12-11 19:46:22+00:00)
Title: Callbacks, batches, and an "update" function

Added some functionality to the rules code. Not sure what you'll think about all these, but yours for the taking :)

1) I added optional callbacks to the add/remove/list functions
2) large numbers of add/remove rules are sent in batches in stay under the 1MB request size max. Default batch size is 1000
3) I added an "update" function which you can pass a bunch of rules to, and it will sync the rules in production to match i.e. will add/remove rules as needed to make the rules in production match the rules you pass in