There are some tutorials on API usage, under "introduction" on http://www.sketchup.com/intl/en/developer/ . The specific tutorial you're looking for is http://www.sketchup.com/intl/en/developer/docs/tutorial_geometry