https://vk.com/dev/friends.get
18986
def _get_friends_count(session, user_id):
        
        response = session.fetch('friends.get', user_id=user_id, count=1)
        return response["count"]
572346
public List<Friend> getPendingFriendRequests() {
		return getFriends(new Filter<Friend>() {

			public boolean accept(Friend friend) {
				return friend.getFriendStatus() == FriendStatus.ADD_REQUEST_PENDING;
			}
		});
	}
450288
def parse_friends(self, friends_page):
    
    user_info = self.parse_sidebar(friends_page)
    second_col = friends_page.find(u'div', {u'id': u'content'}).find(u'table').find(u'tr').find_all(u'td', recursive=False)[1]

    try:
      user_info[u'friends'] = {}

      friends = second_col.find_all(u'div', {u'class': u'friendHolder'})
      if friends:
        for row in friends:
          block = row.find(u'div', {u'class': u'friendBlock'})
          cols = block.find_all(u'div')

          friend_link = cols[1].find(u'a')
          friend = self.session.user(friend_link.text)

          friend_info = {}
          if len(cols) > 2 and cols[2].text != u'':
            friend_info[u'last_active'] = utilities.parse_profile_date(cols[2].text.strip())

          if len(cols) > 3 and cols[3].text != u'':
            friend_info[u'since'] = utilities.parse_profile_date(cols[3].text.replace(u'Friends since', '').strip())
          user_info[u'friends'][friend] = friend_info
    except:
      if not self.session.suppress_parse_exceptions:
        raise

    return user_info
1252932
def get_or_create_with_social_auths(self, social_auths):
        
        social_friend_coll = []
        for sa in social_auths:
            try:
                social_friend = self.get_or_create_with_social_auth(sa)
            except NotImplementedError:
                continue
            social_friend_coll.append(social_friend)

        return social_friend_coll
246009
public function getFriendshipNoRetweetIds($string_ids = null)
	{
		// Check the rate limit for remaining hits
		$this->checkRateLimit('friendships', 'no_retweets/ids');

		$data = array();

		// Check if string_ids is specified
		if (!is_null($string_ids))
		{
			$data['stringify_ids'] = $string_ids;
		}

		// Set the API path
		$path = '/friendships/no_retweets/ids.json';

		// Send the request.
		return $this->sendRequest($path, 'GET', $data);
	}
1175260
public ResponseWrapper addFriends(String username, String... users)
            throws APIConnectionException, APIRequestException {
        StringUtils.checkUsername(username);
        Preconditions.checkArgument(null != users && users.length > 0, "friend list should not be empty");

        JsonArray array = new JsonArray();
        for (String user : users) {
            array.add(new JsonPrimitive(user));
        }

        return _httpClient.sendPost(_baseUrl + userPath + "/" + username + "/friends", array.toString());
    }
1193187
public static function friendsList()
    {
        if (Podium::getInstance()->user->isGuest) {
            return null;
        }
        $logged = static::loggedId();
        $cache = Podium::getInstance()->podiumCache->getElement('user.friends', $logged);
        if ($cache === false) {
            $cache = [];
            $friends = static::findMe()->friends;
            if ($friends) {
                /* @var $friend User */
                foreach ($friends as $friend) {
                    $cache[$friend->id] = $friend->getPodiumTag(true);
                }
            }
            Podium::getInstance()->podiumCache->setElement('user.friends', $logged, $cache);
        }
        return $cache;
    }
1314252
function getFollowers(T, user_id, max_followers, finish) {
  return getFollowersIt(T, user_id, [], -1, max_followers, finish);
}
386051
function getPosts(req, res, next) {
  db.tags.find(req.params.tag, function(err, tag) {
    if(err) { return next(err); }

    db.posts_tags.tagGetPosts(tag.id, function(err, posts) {
      if(err) { return next(err); }
      res.format({
        'text/html': function() {
          res.render('tags/show', {posts: posts, tag: tag});
        },
        'application/json': function() {
          res.json(posts);
        }
      });
    });
  });
}
1224682
public Iterable<DUser> queryByFriends(java.lang.Object friends) {
    return queryByField(null, DUserMapper.Field.FRIENDS.getFieldName(), friends);
  }
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']
        }
1261119
def fetch()
      name = urlfy(@name)
      page = Net::HTTP.get(URI("http://www.gog.com/game/" + name))
      data = JSON.parse(page[/(?<=var gogData = )(.*)(?=;)/,1])
      data
    end
475845
function goGet(api, key, requestor, params) {
  /*jshint validthis: true */

  var query  = {};
  var opt;

  // extract query options
  for (opt in this.options) {
    query[opt] = this.options[opt];
  }

  // unexpected params are ignored,
  // so we don't need to filter the query options from the params object
  var opts   = api.request(key, params, query);
  var duplex = requestor.newDuplex(opts);

  return duplex;
}
222443
function _fetch() {
            vm.error = undefined;
            service.get({}, function (todos) {
                vm.todos = todos;
            }, function () {
                vm.todos = [];
                vm.error = 'An error occurred when fetching available todos';
            });
        }
1206358
function get(req, res) {
  var ptn = '' + req.args[0]
    , keys = this.pattern.filter(ptn, this.conf.getKeys())
    , list = []
    , i
    , k;
  for(i = 0;i < keys.length;i++) {
    k = keys[i];
    list.push(k, '' + this.conf.get(k));
  }
  res.send(null, list);
}
1199001
def get(path, options={}, raw=false, faraday_options={})
      request(:get, path, options, raw, faraday_options)
    end
738534
def _get(self, version, method, url_or_urls, **kwargs):
        
        if not url_or_urls:
            raise ValueError('%s requires a url or a list of urls given: %s' %
                             (method.title(), url_or_urls))

        # a flag we can use instead of calling isinstance() all the time
        multi = isinstance(url_or_urls, list)

        # throw an error early for too many URLs
        if multi and len(url_or_urls) > 20:
            raise ValueError('Embedly accepts only 20 urls at a time. Url '
                             'Count:%s' % len(url_or_urls))

        query = ''

        key = kwargs.get('key', self.key)

        # make sure that a key was set on the client or passed in
        if not key:
            raise ValueError('Requires a key. None given: %s' % key)

        kwargs['key'] = key

        query += urlencode(kwargs)

        if multi:
            query += '&urls=%s&' % ','.join([quote(url) for url in url_or_urls])
        else:
            query += '&url=%s' % quote(url_or_urls)

        url = 'http://api.embed.ly/%s/%s?%s' % (version, method, query)

        http = httplib2.Http(timeout=self.timeout)

        headers = {'User-Agent': self.user_agent,
                   'Connection': 'close'}

        resp, content = http.request(url, headers=headers)

        if resp['status'] == '200':
            data = json.loads(content.decode('utf-8'))

            if kwargs.get('raw', False):
                data['raw'] = content
        else:
            data = {'type': 'error',
                    'error': True,
                    'error_code': int(resp['status'])}

        if multi:
            return map(lambda url, data: Url(data, method, url),
                       url_or_urls, data)

        return Url(data, method, url_or_urls)