Returns a list of Feeds from the API

        :param user: feed username
        :return: list

        Example:
            ret = feed.index('csirtgadgets')
340841
def index(self, user):
        
        uri = self.client.remote + '/users/{0}/feeds'.format(user)
        return self.client.get(uri)
601123
def me(cls, api=None):
        
        api = api if api else cls._API
        extra = {
            'resource': cls.__name__,
            'query': {}
        }
        logger.info('Fetching user information', extra=extra)
        user_data = api.get(cls._URL['me']).json()
        return User(api=api, **user_data)
1140358
def fetchAllUsers(self):
        
        data = {"viewer": self._uid}
        j = self._post(
            self.req_url.ALL_USERS, query=data, fix_request=True, as_json=True
        )
        if j.get("payload") is None:
            raise FBchatException("Missing payload while fetching users: {}".format(j))

        users = []
        for data in j["payload"].values():
            if data["type"] in ["user", "friend"]:
                if data["id"] in ["0", 0]:
                    # Skip invalid users
                    continue
                users.append(User._from_all_fetch(data))
        return users
762962
def user_list(self, params=None):
        """"""

        uri = 'openstack/users'
        if params:
            uri += '?%s' % urllib.urlencode(params)

        resp, body = self.get(uri)
        self.expected_success(200, resp.status)
        body = json.loads(body)
        return rest_client.ResponseBody(resp, body)
237834
def get_user_emails(headers:dict=HEADERS) -> list:
    
    url = _build_url("user", "emails")
    data = _get(url, headers=headers)
    return [Email(email=e.get("email", None), is_primary=e.get("primary", False))
                    for e in data]
851744
def _get_maps_from_user(self, user):
        
        req = Session.query(Map).select_from(join(Map, User))
        return req.filter(User.login==user).all()
293311
def user_list(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_openstack_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.list_users(**kwargs)
179948
def user_parser(user):
    
    if __is_deleted(user):
        return deleted_parser(user)

    if user['id'] in item_types:
        raise Exception('Not a user name')
    if type(user['id']) == int:
        raise Exception('Not a user name')

    return User(
        user['id'],
        user['delay'],
        user['created'],
        user['karma'],
        user['about'],
        user['submitted'],
    )
230851
def list_user_messages_view(request, targetUsername):
    '''  '''
    targetUser = get_object_or_404(User, username=targetUsername)
    targetProfile = get_object_or_404(UserProfile, user=targetUser)
    user_messages = Message.objects.filter(owner=targetProfile)
    thread_pks = list(set([i.thread.pk for i in user_messages]))
    threads = Thread.objects.filter(pk__in=thread_pks)
    page_name = "Threads {0} has posted in".format(targetUser.get_full_name())
    return render_to_response('list_threads.html', {
        'page_name': page_name,
        'threads': threads,
        'targetUsername': targetUsername,
        }, context_instance=RequestContext(request))
171617
def get_feed_posts(self) -> Iterator[Post]:
        

        data = self.context.graphql_query("d6f4427fbe92d846298cf93df0b937d3", {})["data"]

        while True:
            feed = data["user"]["edge_web_feed_timeline"]
            yield from (Post(self.context, edge["node"]) for edge in feed["edges"]
                        if not edge["node"]["__typename"] == "GraphSuggestedUserFeedUnit")
            if not feed["page_info"]["has_next_page"]:
                break
            data = self.context.graphql_query("d6f4427fbe92d846298cf93df0b937d3",
                                              {'fetch_media_item_count': 12,
                                               'fetch_media_item_cursor': feed["page_info"]["end_cursor"],
                                               'fetch_comment_count': 4,
                                               'fetch_like': 10,
                                               'has_stories': False})["data"]
1265040
def get_user(self, screen_name):
        
        # Connecting to the API
        api = self._connectToAPI()

        # Verifying the limits of the API
        self._rate_limit_status(api=api, mode="get_user")

        aux = []
        try:
            user = api.get_user(screen_name)
            # Iterate through the results using user._json
            aux.append(user._json)
        except tweepy.error.TweepError as e:
            pass

        res = []
        # Extracting the information from each profile
        for a in aux:
            res.append(self._processUser(a))
        return res
1250326
def get_subscription_labels(self, userPk):
        """"""
        r = self._request('subscriptions/' + str(userPk))
        if r:
            s = r.json()
            return s
        return []
787752
def users(self):
        
        if self._users is None:
            self._users = UserList(self._version, service_sid=self._solution['sid'], )
        return self._users
404306
def feed(f, limit=25):
    
    if '/' not in f:
        raise ValueError('feed name must be formatted like: '
                         'csirtgadgets/scanners')

    user, f = f.split('/')

    return Feed().show(user, f, limit=limit)
1043816
def get_feed(self, datasource_id):
        
        info = self.__metadb.one(
            """
            SELECT to_json(ds) as datasource
                 , to_json(fc) as connector
                 , to_json(fct) as connector_type
                 , to_json(ctp) as connector_type_preset
                 , json_build_object('email', u.email, 'full_name', u.full_name) as author_user
              FROM meta.feed_datasource ds
              LEFT JOIN meta.feed_connector fc 
                     ON fc.id=ds.connector_id
              LEFT JOIN meta.feed_connector_type fct 
                     ON fct.id=fc.connector_type_id
              LEFT JOIN meta.feed_connector_type_preset ctp 
                     ON ctp.id=ds.connector_type_preset_id
              LEFT JOIN meta.user_list u 
                     ON u.id=ds.author_user_id
             WHERE ds.id = :datasource_id::uuid
            """,
            {"datasource_id": datasource_id}
        )
        return FeedDataSource(**info)
273625
def by_user(self):  # pragma: no cover
        
        users = [i for i in self.__get_users()]
        user_groups = {}
        group_results = {
            tuple(value): key
            for (key, value) in self.by_group().items()
        }
        for user in users:
            user_groups[user] = []
            for user_list, group in group_results.items():
                if user in user_list:
                    user_groups[user].append(group)

        return user_groups
1008163
def in_feed(self, feed):
        ''''''
        kwargs = {self.model._rel_to_feed: feed}
        return self.filter(**kwargs)