Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Adds a player to a game session and creates a player session record. A game session must be in an ACTIVE state, have a creation policy of ALLOW_ALL, and have an open player slot before players can be added to the session.
To create a player session, specify a game session ID and player ID. If successful, the player is added to the game session and a new PlayerSession object is returned.
- createPlayerSession :: Text -> Text -> CreatePlayerSession
- data CreatePlayerSession
- cGameSessionId :: Lens' CreatePlayerSession Text
- cPlayerId :: Lens' CreatePlayerSession Text
- createPlayerSessionResponse :: Int -> CreatePlayerSessionResponse
- data CreatePlayerSessionResponse
- cpsrsPlayerSession :: Lens' CreatePlayerSessionResponse (Maybe PlayerSession)
- cpsrsResponseStatus :: Lens' CreatePlayerSessionResponse Int
Creating a Request
Creates a value of CreatePlayerSession
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreatePlayerSession Source
Represents the input for a request action.
See: createPlayerSession
smart constructor.
Request Lenses
cGameSessionId :: Lens' CreatePlayerSession Text Source
Unique identifier for a game session. Specify the game session you want to add a player to.
cPlayerId :: Lens' CreatePlayerSession Text Source
Unique identifier for the player to be added.
Destructuring the Response
createPlayerSessionResponse Source
Creates a value of CreatePlayerSessionResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CreatePlayerSessionResponse Source
Represents the returned data in response to a request action.
See: createPlayerSessionResponse
smart constructor.
Response Lenses
cpsrsPlayerSession :: Lens' CreatePlayerSessionResponse (Maybe PlayerSession) Source
Object containing the newly created player session record.
cpsrsResponseStatus :: Lens' CreatePlayerSessionResponse Int Source
The response status code.