(self, title)
return story.Story(
            story_id=story_dict.get('id', 0),
            sketch=self,
            api=self.api)
Create a story object.

        Args:
            title: the title of the story.

        Raises:
            RuntimeError: if a story wasn't created for some reason.

        Returns:
            A story object (instance of Story) for the newly
            created story.
Create a story object.
Create a story object .
def create_story(self, title):
        """Create a story object.

        Args:
            title: the title of the story.

        Raises:
            RuntimeError: if a story wasn't created for some reason.

        Returns:
            A story object (instance of Story) for the newly
            created story.
        """
        if self.is_archived():
            raise RuntimeError(
                'Unable to create a story in an archived sketch.')

        resource_url = '{0:s}/sketches/{1:d}/stories/'.format(
            self.api.api_root, self.id)
        data = {
            'title': title,
            'content': ''
        }

        response = self.api.session.post(resource_url, json=data)

        status = error.check_return_status(response, logger)
        if not status:
            error.error_message(
                response, 'Unable to create a story', error=RuntimeError)

        response_json = error.get_response_json(response, logger)
        story_dict = response_json.get('objects', [{}])[0]
        return story.Story(
            story_id=story_dict.get('id', 0),
            sketch=self,
            api=self.api)
def create_story ( self , title ) : if self . is_archived ( ) : raise RuntimeError ( 'Unable to create a story in an archived sketch.' ) resource_url = '{0:s}/sketches/{1:d}/stories/' . format ( self . api . api_root , self . id ) data = { 'title' : title , 'content' : '' } response = self . api . session . post ( resource_url , json = data ) status = error . check_return_status ( response , logger ) if not status : error . error_message ( response , 'Unable to create a story' , error = RuntimeError ) response_json = error . get_response_json ( response , logger ) story_dict = response_json . get ( 'objects' , [ { } ] ) [ 0 ] return story . Story ( story_id = story_dict . get ( 'id' , 0 ) , sketch = self , api = self . api )