A Guide to Writing Programs using the Ministry Platform API