Player direction

How would you get and set a player’s direction using the API?

player.getValue(Keys.HEAD_ROTATION);

Oooo thank you!