Get user's friends.
12805
def get_friends(self):
        """"""
        for k, v in iter(self.user_data.language_data.items()):
            data = []
            for friend in v['points_ranking_data']:
                temp = {'username': friend['username'],
                        'id': friend['id'],
                        'points': friend['points_data']['total'],
                        'languages': [i['language_string'] for i in
                                      friend['points_data']['languages']]}
                data.append(temp)

            return data
1112864
def _get_user(self, user):
        """"""
        return ' '.join([user.username, user.first_name, user.last_name])
1220681
def users_list(self, *args):
        """"""
        if len(self._users) == 0:
            self.log('No users connected')
        else:
            self.log(self._users, pretty=True)
11192
public List<Friend> getOfflineFriends() {
		return getFriends(new Filter<Friend>() {

			public boolean accept(Friend friend) {
				return !friend.isOnline();
			}
		});
	}
1136499
public function getFriends()
    {
        $request = new Request\GetFriendsRequest($this->getCredential());
        $response = $this->sendRequest($request);

        return Request\GetFriendsRequest::parseResponse($response);
    }
1314252
function getFollowers(T, user_id, max_followers, finish) {
  return getFollowersIt(T, user_id, [], -1, max_followers, finish);
}
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;
    }
167232
def get_database_users(self):
        """"""
        url = "db/{0}/users".format(self._database)

        response = self.request(
            url=url,
            method='GET',
            expected_response_code=200
        )

        return response.json()
451132
def get_friend_suggestions(self, scope='graph/read'):
        
        suggestions = _get(
            token=self.oauth.get_user_token(scope),
            uri='/user/socialgraph/suggestions'
        )

        try:
            return json.loads(suggestions)
        except:
            raise MxitAPIException('Error parsing suggestions data')
599197
def load_friends(self):
    
    user_friends = self.session.session.get(u'http://myanimelist.net/profile/' + utilities.urlencode(self.username) + u'/friends').text
    self.set(self.parse_friends(utilities.get_clean_dom(user_friends)))
    return self
1076507
def get_friends(self, username, offset=0, limit=10):

        

        response = self._req('/user/friends/{}'.format(username), {
            'offset' : offset,
            'limit' : limit
        })

        friends = []

        for item in response['results']:
            f = {}
            f['user'] = User()
            f['user'].from_dict(item['user'])
            f['is_watching'] = item['is_watching']
            f['lastvisit'] = item['lastvisit']
            f['watch'] = {
                "friend" : item['watch']['friend'],
                "deviations" : item['watch']['deviations'],
                "journals" : item['watch']['journals'],
                "forum_threads" : item['watch']['forum_threads'],
                "critiques" : item['watch']['critiques'],
                "scraps" : item['watch']['scraps'],
                "activity" : item['watch']['activity'],
                "collections" : item['watch']['collections']
            }

            friends.append(f)

        return {
            "results" : friends,
            "has_more" : response['has_more'],
            "next_offset" : response['next_offset']
        }
441677
public function getFriends()
    {
        try {
            $data = $this->get('/me/friends');
        } catch (Exception $e) {
            throw new \LogicException("Can't get connections from facebook");
        }

        if ($data->error) {
            throw new \LogicException("Can't get connections from facebook");
        }

        $data = AnConfig::unbox($data);
        $data = array_map(function ($user) {return $user['id'];}, $data['data']);
        $data[] = '-1';

        $query = $this->getService('repos:people.person')
        ->getQuery(true)
        ->where(array(
            'sessions.profileId' => $data,
            'sessions.api' => 'facebook'
        ));

        return $query->toEntitySet();
    }
147661
def _retrieve_users(self):
        
        users_url = self._build_url('users')
        response = self._request('GET', users_url)
        users = response.json()
        return users
644952
function Friends (client, opts) {
  var self = this
  if (!(self instanceof Friends)) return new Friends(client, opts)
  if (!opts) opts = {}

  self.client = client
}
203986
def people(self):
        ''''''
        people_response = self.get_request('people/')
        return [Person(self, pjson['user']) for pjson in people_response]
562260
def get_owner_names_value(self, obj):
        """"""
        return [
            self._get_user(user)
            for user in get_users_with_permission(obj, get_full_perm('owner', obj))
        ]
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