Returns a full StoryDataWrapper object for this creator.

        /creators/{creatorId}/stories

        :returns:  StoriesDataWrapper -- A new request to API. Contains full results set.
510173
def get_stories(self, *args, **kwargs):
        
        from .story import Story, StoryDataWrapper
        return self.get_related_resource(Story, StoryDataWrapper, args, kwargs)
183975
def create_list_stories(
    list_id_stories, number_of_stories, shuffle, max_threads
):
    """"""

    list_stories = []
    with ThreadPoolExecutor(max_workers=max_threads) as executor:
        futures = {
            executor.submit(get_story, new)
            for new in list_id_stories[:number_of_stories]
        }

        for future in tqdm(
            as_completed(futures),
            desc='Getting results',
            unit=' news',
        ):
            list_stories.append(future.result())

    if shuffle:
        random.shuffle(list_stories)
    return list_stories
926061
def get_datastreams(self):
        
        datastreams = []
        response = self.http.get('/Datastream')
        for datastream in response:
            datastreams.append(Schemas.Datastream(datastream=datastream))
        return datastreams
546790
def all
      response = request(:get_all)
      handles = response.values.flatten.collect { |handle| Entity::Handle.build(handle) }
      get_data_for_handles(handles)

      self
    end
1071839
def find_by_id(self, story, params={}, **options): 
        
        path = "/stories/%s" % (story)
        return self.client.get(path, params, **options)
306286
def get_child_story(self):
        logger.debug('# get_child_story')
        
        story_loop = self.compiled_story()
        if hasattr(story_loop, 'children_matcher') and not self.matched:
            return self.get_story_scope_child(story_loop)

        story_part = self.get_current_story_part()

        if not hasattr(story_part, 'get_child_by_validation_result'):
            logger.debug('# does not have get_child_by_validation_result')
            return None

        if isinstance(self.waiting_for, forking.SwitchOnValue):
            logger.debug('# switch on value')
            return story_part.get_child_by_validation_result(self.waiting_for.value)

        # for some base classes we could try validate result direct
        child_story = story_part.get_child_by_validation_result(self.waiting_for)
        if child_story:
            logger.debug('# child_story')
            logger.debug(child_story)
            return child_story

        stack_tail = self.stack_tail()
        if stack_tail['data'] is not None and not self.matched:
            validator = matchers.deserialize(stack_tail['data'])
            logger.debug('# validator')
            logger.debug(validator)
            logger.debug('# self.message')
            logger.debug(self.message)
            validation_result = validator.validate(self.message)
            logger.debug('# validation_result')
            logger.debug(validation_result)
            res = story_part.get_child_by_validation_result(validation_result)
            logger.debug('# res')
            logger.debug(res)
            # or we validate message
            # but can't find right child story
            # maybe we should use independent validators for each story here
            if res is None:
                return self.get_story_scope_child(story_part)
            else:
                return res

        return None
381944
protected function _buildStories() {
        $storiesByPageNumber    = array();
        $storiesByTag           = array();
        $pagesCount             = count($this->pages);

        // Build an array with all textframe positions, divided into the accompanying story XML tags
        foreach ($this->textFrames as $textFrame) {
            $story = new Garp_Adobe_InDesign_Story($textFrame->storyId, $this->_workingDir);
            if ($tag = $story->getTag()) {
                $storiesByTag[$tag][] = array(
                    'storyId' => $textFrame->storyId,
                    'x' => $textFrame->x
                );
            }
        }

        //  sort the stories by horizontal position
        $sortFunction = function ($storyA, $storyB) {
            if ($storyA['x'] == $storyB['x']) {
                return 0;
            }
            return $storyA['x'] > $storyB['x'] ? 1 : -1;
        };

        foreach ($storiesByTag as &$stories) {
            usort($stories, $sortFunction);
        }

        //  now divide the stories in pages
        foreach ($storiesByTag as $tagStories) {
            $tagStoriesCount    = count($tagStories);
            $tagStoriesPerPage  = $tagStoriesCount / $pagesCount;

            foreach ($tagStories as $s => $tagStory) {
                $page           = floor($s / $tagStoriesPerPage);
                $pageNumber     = $this->pages[$page]->index;
                $storiesByPageNumber[$pageNumber][] = $tagStory['storyId'];
            }
        }

        return $storiesByPageNumber;
    }
123870
function buildWrapper(chartType, dataTable, options, containerId) {
      var wrapper = new google.visualization.ChartWrapper({
        chartType: chartType,
        dataTable: dataTable,
        options: options,
        containerId: containerId
      });

      return wrapper;
    }
644260
public DialogWrapper getDialogWrapper(Dialog d) {
    	if (d == null) {
    		return null;
    	}
    	DialogWrapper dw = null;
    	DialogWrapperAppData dwad = (DialogWrapperAppData) d.getApplicationData();
    	if (dwad != null) {
    		dw = dwad.getDialogWrapper(d, this);
    	}
		return dw;
	}
1202368
def story
      return @story if @story
      story_id = Git.get_config(KEY_STORY_ID, :branch)
      if story_id.blank? && (matchdata = /^[a-z0-9_\-]+\/(\d+)(-[a-z0-9_\-]+)?$/i.match(Git.current_branch))
        story_id = matchdata[1]
        Git.set_config(KEY_STORY_ID, story_id, :branch) unless story_id.blank?
      end
      if story_id.blank?
        story_id = ask('What Pivotal story ID is this branch associated with?').strip
        Git.set_config(KEY_STORY_ID, story_id, :branch) unless story_id.blank?
      end
      return nil if story_id.blank?
      return (@story = Story.new(project, project.stories.find(story_id.to_i), branch_name: Git.current_branch))
    end
37390
def get_creators(self, *args, **kwargs):
        
        from .creator import Creator, CreatorDataWrapper
        return self.get_related_resource(Creator, CreatorDataWrapper, args, kwargs)
61488
def wrap_paginated(self, data, renderer_context):
        """"""

        pagination_keys = ['count', 'next', 'previous', 'results']
        for key in pagination_keys:
            if not (data and key in data):
                raise WrapperNotApplicable('Not paginated results')

        view = renderer_context.get("view", None)
        model = self.model_from_obj(view)
        resource_type = self.model_to_resource_type(model)

        try:
            from rest_framework.utils.serializer_helpers import ReturnList

            results = ReturnList(
                data["results"],
                serializer=data.serializer.fields["results"],
            )
        except ImportError:
            results = data["results"]

        # Use default wrapper for results
        wrapper = self.wrap_default(results, renderer_context)

        # Add pagination metadata
        pagination = self.dict_class()

        pagination['previous'] = data['previous']
        pagination['next'] = data['next']
        pagination['count'] = data['count']

        wrapper.setdefault('meta', self.dict_class())

        wrapper['meta'].setdefault('pagination', self.dict_class())
        wrapper['meta']['pagination'].setdefault(
            resource_type, self.dict_class()).update(pagination)

        return wrapper
219776
def datasetsGenerator(self, request):
        
        return self._topLevelObjectGenerator(
            request, self.getDataRepository().getNumDatasets(),
            self.getDataRepository().getDatasetByIndex)
367113
def wrapup(self):
        
        self._loader = None
        self._iterator = None
        super(LoadDataset, self).wrapup()
334163
def download_data
      scraper_data = {}

      @data_to_get.each do |data_category|
        if /liked_(.*)/ =~ data_category
          argument = $1.to_sym  # :tracks, :artists, :stations or :albums
          scraper_data[data_category] = @scraper.public_send(:likes, argument)
        else
          scraper_data[data_category] = @scraper.public_send(data_category)
        end
      end

      scraper_data
    end
796180
protected function _preloadData($stories)
    {
        $node_ids = array();
        $comment_ids = array();
        foreach ($stories as $story) {
            $columns = $story->getRowData();
            $node_ids = array_merge($node_ids,
                    $story->getIds('owner'),
                    $story->getIds('subject'),
                    $story->getIds('target'),
                    $story->getIds('object')
                    );
            $comment_ids = array_merge($comment_ids, $story->getIds('comment'));
        }
        $node_ids = array_unique($node_ids);
        $query = $this->getService('repos://site/base.comment')->getQuery()->where('parent.id', 'IN', $node_ids);
        $author_ids = $query->fetchValues('author.id');
        $node_ids = array_unique(array_merge($node_ids, $author_ids, $comment_ids));

        //we don't any behavior messes around with the fetched stories              
        $query = $this->getService('repos://site/base.node')->getQuery()->id($node_ids)->disableChain();
        $query->columns('*');
        $nodes = $query->fetchSet();
        $nodes = AnHelperArray::indexBy($nodes, 'id');
        $this->_loaded_nodes = $nodes;
    }
1216185
function getRawRequest(context, excludedPreLoaders) {
    excludedPreLoaders = excludedPreLoaders || /eslint-loader/;
    return loaderUtils.getRemainingRequest({
        resource: context.resource,
        loaderIndex: context.loaderIndex,
        loaders: context.loaders.filter(loader => !excludedPreLoaders.test(loader.path))
    });
}