Has anyone written any code to the talk to the internet API of the Phillips Hue

I got a Hue starter kit (for my birthday) and would like to create a call to their internet api, triggered by a button press (a family-friendly goodnight button to turn them off at bedtime).

Though this should be fairly straightforward, I don’t want to re-invent the wheel so thought I check first if anyone else has already done this (or similar) and has code they’d like to share.