async def set_playstate(self, state, pos=<NUM_LIT:0>):
url = '<STR_LIT>'.format(<EOL>self.server.construct_url(API_URL), self.session_id, state)<EOL>params = {'<STR_LIT>': self.server.api_key}<EOL>if state == '<STR_LIT>':<EOL><INDENT>params['<STR_LIT>'] = int(pos * <NUM_LIT>)<EOL>params['<STR_LIT>'] = '<STR_LIT:true>'<EOL><DEDENT>_LOGGER.debug('<STR_LIT>', url)<EOL>post = await self.server.api_post(url, params)<EOL>if post is None:<EOL><INDENT>_LOGGER.debug('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>_LOGGER.debug('<STR_LIT>', post)<EOL><DEDENT>
Send media commands to server.