See: https://core.telegram.org/bots/api#getuserprofilephotos
427482
def getUserProfilePhotos(self, user_id,
                             offset=None,
                             limit=None):
        
        p = _strip(locals())
        return self._api_request('getUserProfilePhotos', _rectify(p))
885500
def get_user_profile(self, user_id):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - user_id
        """ID"""
        path["user_id"] = user_id

        self.logger.debug("GET /api/v1/users/{user_id}/profile with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("GET", "/api/v1/users/{user_id}/profile".format(**path), data=data, params=params, single_item=True)
885876
public function getProfilePictureAction()
    {
        $melisCoreAuth = $this->serviceLocator->get('MelisCoreAuth');
        $moduleSvc = $this->getServiceLocator()->get('ModulesService');
        $user = $melisCoreAuth->getIdentity();
        $imageDefault = $moduleSvc->getModulePath('MelisCore') . '/public/images/profile/default_picture.jpg';

        if (!empty($user) && !empty($user->usr_image)) {
            $image = $user->usr_image;
        } else {
            $image = file_get_contents($imageDefault);
        }

        $response = $this->getResponse();

        $response->setContent($image);
        $response->getHeaders()
            ->addHeaderLine('Content-Transfer-Encoding', 'binary')
            ->addHeaderLine('Content-Type', 'image/jpg');

        return $response;
    }
817320
function profile(username = _noUsernameError()) {
	return co(function *resolveUsername() {
		const userId = yield _getIdByUsername(username);
		const url = `${API}/users/${userId}`;
		const params = { app: 3	};

		return http
			.GET(url, params)
			.then(data => data.profile);
	});
}
642363
def get_profile_info(self, raw_token, profile_info_params={}):
        ""
        try:
            response = self.request('get', self.provider.profile_url, token=raw_token, params=profile_info_params)
            response.raise_for_status()
        except RequestException as e:
            logger.error('Unable to fetch user profile: {0}'.format(e))
            return None
        else:
            return response.json() or response.text
210744
def get_user_details(self, response):
        
        user = response

        # Rename to what psa expects
        fullname = user.get('name', None)
        if fullname:
            user['fullname'] = fullname
            user.pop('name')

        # Get profile photo url if any
        profilephoto_id = user.get('profilephoto', None)
        if profilephoto_id:
            profilephoto_url = '{}/userinfo/v1/user/media/{}'.format(self.API_URL, profilephoto_id)
            user['profilephoto_url'] = profilephoto_url

        return user
521507
def photos(page = 1, per_page = 10)
      params = {
        page:     page,
        per_page: per_page
      }

      list = JSON.parse(connection.get("/users/#{username}/photos", params).body)
      list.map do |photo|
        Unsplash::Photo.new photo.to_hash
      end
    end
122524
func (b *Bot) ProfilePhotosOf(user *User) ([]Photo, error) {
	params := map[string]string{
		"user_id": user.Recipient(),
	}

	respJSON, err := b.Raw("getUserProfilePhotos", params)
	if err != nil {
		return nil, err
	}

	var resp struct {
		Ok     bool
		Result struct {
			Count  int     `json:"total_count"`
			Photos []Photo `json:"photos"`
		}

		Description string `json:"description"`
	}

	err = json.Unmarshal(respJSON, &resp)
	if err != nil {
		return nil, errors.Wrap(err, "bad response json")
	}

	if !resp.Ok {
		return nil, errors.Errorf("api error: %s", resp.Description)
	}

	return resp.Result.Photos, nil
}
675832
function getUserProfile()
    {
        $this->api->curl_header = array(
            'Authorization: Bearer '.$this->api->access_token,
        );
        $data = $this->api->get( $this->userProfileUrl );
        $data = VariableUtil::json2Array($data);

        /*
         * Get the base URL with the instance to store it along with the
         * Token data.
         */
        $urlParts = parse_url($data['profile']);
        $this->api->api_base_url = $urlParts['scheme'].'://'.$urlParts['host'];

        return $data;
    }
300199
def profile_pic_url(self) -> str:
        """"""
        if self._context.is_logged_in:
            try:
                return self._iphone_struct['hd_profile_pic_url_info']['url']
            except (InstaloaderException, KeyError) as err:
                self._context.error('{} Unable to fetch high quality profile pic.'.format(err))
                return self._metadata("profile_pic_url_hd")
        else:
            return self._metadata("profile_pic_url_hd")
1358724
def get_profile_from_tokens(token_records, public_key_or_address,
                            hierarchical_keys=False):
    
    if hierarchical_keys:
        raise NotImplementedError("Hierarchical key support not implemented")

    profile = {}

    for token_record in token_records:
        # print token_record
        try:
            decoded_token = verify_token_record(token_record, public_key_or_address)
        except ValueError:
            # traceback.print_exc()
            continue
        else:
            if "payload" in decoded_token:
                if "claim" in decoded_token["payload"]:
                    claim = decoded_token["payload"]["claim"]
                    profile.update(claim)

    return profile
271065
def get_profile(self):
        
        r = self._session.get(API_URL + "/logins/me")
        r.raise_for_status()

        return r.json()
1253788
def photos(self):
        """"""
        # Reverse because pictures appear in inverse chronological order.
        for photo_info in self.dest_user.profile.photo_infos:
            self.dest_user.photo.delete(photo_info)
        return [self.dest_user.photo.upload_and_confirm(info)
                for info in reversed(self.source_profile.photo_infos)]
825557
function getUserProfile(callback) {
    if (_.isUndefined(callback)) {
    } else {
      var u = baseUrl + "/me";
      var tokenData = this.getAuthToken();
      if (tokenData.type != "bearer") {
        throw new Error("Invalid token type. Must use a token of type bearer.");
      }
      return helper.get(tokenData, u, callback);
    }
  }
904083
def render(self):
        """"""
        t = template.loader.get_template('support/forms/profile_picture.html')
        return t.render(template.Context({'widget': self, 'MEDIA_URL': settings.MEDIA_URL }))
346950
private function getImages()
    {
        $photos = $this->event->get('photo');
        $largetstPhoto = array_pop($photos);
        $response = $this->http->get($this->buildApiUrl('getFile'), [
            'file_id' => $largetstPhoto['file_id'],
        ]);

        $responseData = json_decode($response->getContent());

        if ($response->getStatusCode() !== 200) {
            throw new TelegramAttachmentException('Error retrieving file url: '.$responseData->description);
        }

        $url = $this->buildFileApiUrl($responseData->result->file_path);

        return [new Image($url, $largetstPhoto)];
    }
894219
def from_array(array):
        
        if array is None or not array:
            return None
        # end if
        assert_type_or_raise(array, dict, parameter_name="array")

        data = {}
        data['total_count'] = int(array.get('total_count'))
        data['photos'] = PhotoSize.from_array_list(array.get('photos'), list_level=2)
        data['_raw'] = array
        return UserProfilePhotos(**data)