Returns a list of the user's friends.
339972
def get_friends(self, limit=50, cacheable=False):
        

        seq = []
        for node in _collect_nodes(
            limit, self, self.ws_prefix + ".getFriends", cacheable
        ):
            seq.append(User(_extract(node, "name"), self.network))

        return seq
142840
def list_members(self, retrieve_all=True, **_params):
        """"""
        # Pass filters in "params" argument to do_request
        return self.list('members', self.members_path, retrieve_all,
                         **_params)
757653
private function findFriendshipsByStatus($status, $limit, $offset): array
    {
        $friendships = [];

        $query = Friend::where(function ($query) use ($status) {
            $query->where('sender_id', $this->id);
            $query->where('sender_type', get_class($this));

            if (!empty($status)) {
                $query->where('status', $status);
            }
        })->orWhere(function ($query) use ($status) {
            $query->where('recipient_id', $this->id);
            $query->where('recipient_type', get_class($this));

            if (!empty($status)) {
                $query->where('status', $status);
            }
        });

        if (!empty($limit)) {
            $query->take($limit);
        }

        if (!empty($offset)) {
            $query->skip($offset);
        }

        foreach ($query->get() as $friendship) {
            $friendships[] = $this->getFriendship($this->find(
                ($friendship->sender_id == $this->id) ? $friendship->recipient_id : $friendship->sender_id
            ));
        }

        return $friendships;
    }
203986
def people(self):
        ''''''
        people_response = self.get_request('people/')
        return [Person(self, pjson['user']) for pjson in people_response]
60740
def fetch_friend_ids(self, user):
        
        friends = self.fetch_friends(user)

        return [friend['ns1_email']['address']
                for friend in friends
                if 'ns1_email' in friend]
1070460
def list_members(context, request):
    """"""
    members = context.members()
    return {
        'users': [{
            'username': m.identifier,
            'userid': m.userid,
            'roles': context.get_member_roles(m.userid),
            'links': [rellink(m, request)]
        } for m in members]
    }
282218
def list_users(self, instance, limit=None, marker=None):
        """"""
        return instance.list_users(limit=limit, marker=marker)
458685
def getFriends(self,user_id="astronauta.mecanico",write=True):
        """"""
        while user_id not in self.browser.url:
            self.browser.visit("http://www.facebook.com/{}/friends".format(user_id), wait_time=3)
        #self.go("http://www.facebook.com/{}/friends".format(user_id))
        T=time.time()
        while 1:
            h1=self.browser.evaluate_script("document.body.scrollHeight")
            self.browser.execute_script("window.scrollTo(0, document.body.scrollHeight);")
            h2=self.browser.evaluate_script("document.body.scrollHeight")
            if h1 != h2:
                T=time.time()
            elif time.time()-T>10:
                break
        #links=self.browser.find_link_by_partial_href("hc_location=friends_tab")
        links=self.browser.find_by_css(".fcb")
        friends=[]
        for link in links:
            name=link.value
            user_id_=link.find_by_tag("a")["href"].split("/")[-1].split("?")[0]
            friends.append((user_id_,name))
        tdict={}
        tdict["name"]=self.browser.find_by_id("fb-timeline-cover-name").value
        tdict["user_id"]=user_id
        tdict["friends"]=friends
        infos=self.browser.find_by_css("._3c_")
        mutual=0
        for info in infos:
            if info.value=="Mutual Friends":
                if info.find_by_css("._3d0").value:
                    tdict["n_mutual"]=info.find_by_css("._3d0").value
                    mutual=1
            if info.value=="All Friends":
                    tdict["n_friends"]=info.find_by_css("._3d0").value
        if mutual==0:
            links=self.browser.find_by_css("._gs6")
            if "Mutual" in links.value:
                tdict["n_mutual"]=links.value.split(" ")[0]
        if write:
            if not os.path.isdir("{}/fb_ids/".format(self._BASE_DIR)):
                os.mkdir("{}/fb_ids/".format(self._BASE_DIR))
            with open("{}fb_ids/{}.pickle".format(self._BASE_DIR,user_id),"wb") as f:
                pickle.dump(tdict,f)
        self.tdict=tdict
        return tdict
8572
def get_user_contact_lists(self, id, **data):
        
        
        return self.get("/users/{0}/contact_lists/".format(id), data=data)
150880
def existing_social_friends(self, user_social_auth=None, friend_ids=None):
        
        # Type check
        self.assert_user_is_social_auth_user(user_social_auth)

        if not friend_ids:
            friend_ids = self.fetch_social_friend_ids(user_social_auth)

        # Convert comma sepearated string to the list
        if isinstance(friend_ids, basestring):
            friend_ids = eval(friend_ids)

        # Match them with the ones on the website
        if USING_ALLAUTH:
            return User.objects.filter(socialaccount__uid__in=friend_ids).all()            
        else:
            return User.objects.filter(social_auth__uid__in=friend_ids).all()
417744
public List<Friend> getFriends(Filter<Friend> filter) {
		final ArrayList<Friend> friends = new ArrayList<>();
		for (final RosterEntry e : connection.getRoster().getEntries()) {
			final Friend f = new Friend(this, connection, e);
			if (filter.accept(f)) {
				friends.add(f);
			}
		}
		return friends;
	}
293311
def user_list(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_openstack_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.list_users(**kwargs)
1018843
private function getFriend()
    {
        $friend = [];
        $friend_area = $this->_parser->find('.container-left .user-profile', 0);
        $friend_area = $friend_area->find('.user-friends', 0);

        $friend_count = $friend_area->prev_sibling()->find('a', 0)->plaintext;
        preg_match('/\(\d+\)/', $friend_count, $friend_count);
        $friend['count'] = str_replace(['(', ')'], '', $friend_count[0]);

        $friend['data'] = [];
        foreach ($friend_area->find('a') as $f) {
            $temp_friend = [];

            $temp_friend['name'] = $f->plaintext;
            $temp_friend['image'] = Helper::imageUrlCleaner($f->getAttribute('data-bg'));

            $friend['data'][] = $temp_friend;
        }

        return $friend;
    }
964407
def collaborators(self):
        
        if self.api and self.collaborator_ids:
            return self.api._get_users(self.collaborator_ids)
1328014
def get_users(self, **kwargs):
        
        return GetUsers(settings=self.settings, **kwargs).call(**kwargs)
55051
def tags_getListUserPopular(user_id='', count=''):
    """"""
    method = 'flickr.tags.getListUserPopular'
    auth = user_id == ''
    data = _doget(method, auth=auth, user_id=user_id)
    result = {}
    if isinstance(data.rsp.tags.tag, list):
        for tag in data.rsp.tags.tag:
            result[tag.text] = tag.count
    else:
        result[data.rsp.tags.tag.text] = data.rsp.tags.tag.count
    return result
169547
def friends(user_id, options={})
      data = oauth_request("/friend/user/#{user_id}", options)
      Hashie::Mash.new(data["friends"])
    end