Returns a list of all :class:`~plexapi.myplex.MyPlexUser` objects connected to your account.
            This includes both friends and pending invites. You can reference the user.friend to
            distinguish between the two.
2649
def users(self):
        
        friends = [MyPlexUser(self, elem) for elem in self.query(MyPlexUser.key)]
        requested = [MyPlexUser(self, elem, self.REQUESTED) for elem in self.query(self.REQUESTED)]
        return friends + requested
40493
def list(self):
        
        response = self.client._make_request('/accounts')
        response = response.json()
        return self.client._list_response(response)
957345
public List<Friend> getOnlineFriends() {
		return getFriends(new Filter<Friend>() {

			public boolean accept(Friend friend) {
				return friend.isOnline();
			}
		});
	}
906697
def get_collaborators(self, affiliation=github.GithubObject.NotSet):
        

        url_parameters = dict()
        allowed_affiliations = ['outside', 'direct', 'all']
        if affiliation is not github.GithubObject.NotSet:
            assert isinstance(affiliation, str), affiliation
            assert affiliation in allowed_affiliations, \
                'Affiliation can be one of ' + ', '.join(allowed_affiliations)
            url_parameters['affiliation'] = affiliation

        return github.PaginatedList.PaginatedList(
            github.NamedUser.NamedUser,
            self._requester,
            self.url + "/collaborators",
            url_parameters
        )
252321
def mentioned_users(reply_all = true, screen_name = $bot[:config][:screen_name])
      userlist = [ self.user.screen_name ]
      if reply_all
        self.text.scan /@([A-Za-z0-9_]{1,16})/ do |user_name|
          user_name = user_name[0]
          userlist << user_name unless userlist.include?(user_name) or screen_name == user_name
        end
      end
      userlist
    end
741329
public List<Friend> getFriends() {
		return getFriends(new Filter<Friend>() {

			public boolean accept(Friend e) {
				return true;
			}
		});
	}
572346
public List<Friend> getPendingFriendRequests() {
		return getFriends(new Filter<Friend>() {

			public boolean accept(Friend friend) {
				return friend.getFriendStatus() == FriendStatus.ADD_REQUEST_PENDING;
			}
		});
	}
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
885685
def list_friends(self, delegate, user=None, params={}, extra_args=None, page_delegate=None):
        """"""
        if user:
            url = '/statuses/friends/' + user + '.xml'
        else:
            url = '/statuses/friends.xml'

        return self.__get_maybe_paging(url, delegate, params, txml.PagedUserList, extra_args, page_delegate)
989687
def invites(self):
        
        if self._invites is None:
            self._invites = InviteList(
                self._version,
                service_sid=self._solution['service_sid'],
                channel_sid=self._solution['sid'],
            )
        return self._invites
1318587
def get_all(self, request, notifications, mark_as_read=False):
        
        return self.list(request, notifications)
425566
def users(self):
        
        if not self.__users:
            self.__users = Users(self.__connection)
        return self.__users
435991
def fetch_friends(self, user):
        

        # Fetch the token key and secret
        if USING_ALLAUTH:
            social_app = SocialApp.objects.get_current('twitter')
            consumer_key = social_app.key
            consumer_secret = social_app.secret

            oauth_token = SocialToken.objects.get(account=user, app=social_app).token
            oauth_token_secret = SocialToken.objects.get(account=user, app=social_app).token_secret
        else:
            t = TwitterBackend()
            tokens = t.tokens(user)
            oauth_token_secret = tokens['oauth_token_secret']
            oauth_token = tokens['oauth_token']

            # Consumer key and secret from settings
            consumer_key = settings.TWITTER_CONSUMER_KEY
            consumer_secret = settings.TWITTER_CONSUMER_SECRET

        # now fetch the twitter friends using `python-twitter`
        api = twitter.Api(
            consumer_key=consumer_key,
            consumer_secret=consumer_secret,
            access_token_key=oauth_token,
            access_token_secret=oauth_token_secret
        )
        return api.GetFriends()
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
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()
883289
def friends(self):
        
        if self._friends is None:
            self.assert_bind_client()
            if self.friend_count > 0:
                self._friends = self.bind_client.get_athlete_friends(self.id)
            else:
                # Shortcut if we know there aren't any
                self._friends = []
        return self._friends
229998
def get_joined_members(self, force_resync=False) -> List[User]:
        
        if force_resync:
            response = self.client.api.get_room_members(self.room_id)
            for event in response['chunk']:
                if event['content']['membership'] == 'join':
                    user_id = event["state_key"]
                    if user_id not in self._members:
                        self._mkmembers(
                            User(
                                self.client.api,
                                user_id,
                                event['content'].get('displayname'),
                            ),
                        )
        return list(self._members.values())