Update all examples to use v1 API

All the examples should now compile under the v1 API.