Network Simulation 3 is a very complicated framework written in C++. There are little useful API demonstration on the Internet. All you can do is look up the name of API in the official website, then guess what it can do it for you. If you think the API is useful to you, you can search the code snippet in the examples.
Maybe the NS3 is not mature enough, you cannot find out enough resource in Stack Overflow or other place. The above paragraph is the method I try to control the API or the framework.