Return items for a particular category
963883
def getCategoryContent(self, category, excludeRead=False, continuation=None, loadLimit=20, since=None, until=None):
        
        return self._getFeedContent(category.fetchUrl, excludeRead, continuation, loadLimit, since, until)
1326508
def get_choices(cls, category):
        """"""
        value = cls._DEFAULTS[category]
        if not isinstance(value, list):
            raise ValueError("{} does not offer choices".format(category))
        return value
224606
def folderitems(self):
        
        items = super(AnalysisSpecificationView, self).folderitems()
        self.categories.sort()
        return items
665171
function list(category){
	let list = [];

	if (category && typeof(category) === 'string') {
		list = _(goblin.ambush).filter(function(current) {
			return _.includes(current.category, category);
		}).map('id').value();
	} else {
		list = _(goblin.ambush).map('id').value();
	}
	
	return list;

}
1047174
def _in_items(self, restrictions):
        """"""
        def build_in(table, name, value):
            return "{}.{} IN ({})".format(table, name,
                                          ", ".join(["?"] * len(value)))

        in_items = self._build_where(restrictions, for_in=True)
        names = [build_in(*restriction) for restriction in in_items]
        values = list(chain(*[item[2] for item in in_items]))
        return (names, values)
1058442
def _list_items(action, key, profile=None, subdomain=None, api_key=None):
    '''
    
    '''
    items = _query(
        profile=profile,
        subdomain=subdomain,
        api_key=api_key,
        action=action
    )
    ret = {}
    for item in items[action]:
        ret[item[key]] = item
    return ret
1153333
def get_items(self):
        """"""
        itemlist = []
        def add_to_itemlist(item):
            for index in range(item.childCount()):
                citem = item.child(index)
                itemlist.append(citem)
                add_to_itemlist(citem)
        for tlitem in self.get_top_level_items():
            add_to_itemlist(tlitem)
        return itemlist
1101066
def to_request
      item_pedido = {
        codigo_produto:           self.codigo_produto,
        codigo_categoria:         self.codigo_categoria,
        nome_produto:             self.nome_produto,
        quantidade_produto:       self.quantidade_produto,
        valor_unitario_produto:   self.valor_unitario_produto,
        nome_categoria:           self.nome_categoria,
      }
      return item_pedido
    end
1318483
def categories(self):
        
        r = [ch for ch in self._channels.values() if isinstance(ch, CategoryChannel)]
        r.sort(key=lambda c: (c.position, c.id))
        return r
265567
def _get_item_class(self, url):
        
        if '/layers/' in url:
            return Layer
        elif '/tables/' in url:
            return Table
        elif '/sets/' in url:
            return Set
        # elif '/documents/' in url:
        #     return Document
        else:
            raise NotImplementedError("No support for catalog results of type %s" % url)
1170818
def sort_items(items):
    """"""

    sorted_items = {}
    for item in items:
        category = lookup(item, 'itemCategory', 'categoryCode')
        if sorted_items.get(category) is None:
            sorted_items[category] = []
        sorted_items[category].append(item)

    return sorted_items
1040452
def _get_item(list_containing_dicts_entries, attribute_value,
                  attribute_name='subnet_id'):
        
        for item in list_containing_dicts_entries:
            if item.get(attribute_name) == attribute_value:
                return item
        return {}
1208384
def filter(cls, **items):
        '''
        
        '''
        client = cls._new_api_client(subpath='/search')
        items_dict = dict((k, v) for k, v in list(items.items()))
        json_data = json.dumps(items_dict, sort_keys=True, indent=4)
        return client.make_request(cls, 'post', post_data=json_data)
1254062
def output_list(self, category):
        """"""
        print('{} users:'.format(category))
        for user in getattr(self.sub, category):
            print('  {}'.format(user))
851930
def get_items(self) -> Iterator[StoryItem]:
        """"""
        yield from (StoryItem(self._context, item, self.owner_profile) for item in reversed(self._node['items']))
770062
def item_dict(self, item):
        
        # mocking wierd JSON structure
        ret_dict = {"terms":{"category":[],"post_tag":[]}}
        for e in item:
            # is it a category or tag??
            if "category" in e.tag:
                # get details
                slug = e.attrib["nicename"]
                name = htmlparser.unescape(e.text)
                # lookup the category or create one
                cat_dict = self.category_dict.get(slug) or {"slug":slug,
                                                             "name":name,
                                                             "taxonomy":"category"}
                ret_dict['terms']['category'].append(cat_dict)

            elif e.tag[-3:] == 'tag':
                # get details
                slug = e.attrib.get("tag_slug")
                name = htmlparser.unescape(e.text)
                # lookup the tag or create one
                tag_dict = self.tags_dict.get(slug) or {"slug":slug,
                                                        "name":name,
                                                        "taxonomy":"post_tag"}

                ret_dict['terms']['post_tag'].append(tag_dict)
            # else use tagname:tag inner test
            else:
                ret_dict[e.tag] = e.text
            # remove empty accumulators
        empty_keys = [k for k,v in ret_dict["terms"].items() if not v]
        for k in empty_keys:
            ret_dict["terms"].pop(k)
        return ret_dict
1028682
def items(self):
        """"""
        l = []
        for e in self.data:
            l += e.items()
        return l