User's dropdown selection

You should first try to generate some own code, by following the API-examples (given in the link).

And then, when you do have generated some code and still have issues, then simply show your generated code and ask your question.