示例#1
0
    def action_request(self):
        title = API.get_title_by_id(self.str_input)
        # in this case, pass it in as a list
        self.build_response([title])

        if len(self.response.avail_titles) > 0:
            self.response.message = 'Great! %s is available to stream!' % title.name
        else:
            self.response.message = 'Unfortunately %s is not available to stream.  You might want to set up ' \
                                    'an alert.' % title.name