当前位置: 首页>>代码示例>>Java>>正文


Java Flickr.getPeopleInterface方法代码示例

本文整理汇总了Java中com.flickr4java.flickr.Flickr.getPeopleInterface方法的典型用法代码示例。如果您正苦于以下问题:Java Flickr.getPeopleInterface方法的具体用法?Java Flickr.getPeopleInterface怎么用?Java Flickr.getPeopleInterface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.flickr4java.flickr.Flickr的用法示例。


在下文中一共展示了Flickr.getPeopleInterface方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: queryFlickrOnUserEmail

import com.flickr4java.flickr.Flickr; //导入方法依赖的package包/类
/**
 * Having what we presume is an email, query Flickr for the UserId string
 * 
 * @param presumedEmail
 * @return Flickr user's Id string if found, otherwise null
 * @throws FlickrException Flickr throws with a user not found message if
 *             such applies
 */
private String queryFlickrOnUserEmail(Flickr flickr, String presumedEmail) throws FlickrException
{
	String flickrUserId = null;
	PeopleInterface pi = flickr.getPeopleInterface();
	User flickrUser = null;
	try
	{
		flickrUser = pi.findByEmail(presumedEmail);
	}
	catch( FlickrException fe ) // NOSONAR - throw these in the raw, wrap
								// any others
	{
		throw fe;
	}
	catch( Exception e )
	{
		throw Throwables.propagate(e);
	}

	if( flickrUser != null )
	{
		flickrUserId = flickrUser.getId();
	}

	return flickrUserId;
}
 
开发者ID:equella,项目名称:Equella,代码行数:35,代码来源:FlickrServiceImpl.java

示例2: queryFlickrOnUsername

import com.flickr4java.flickr.Flickr; //导入方法依赖的package包/类
/**
 * Having what we presume is an email, query Flickr for the UserId string
 * 
 * @param presumedEmail
 * @return Flickr user's Id string if found, otherwise null
 * @throws FlickrException Flickr throws with a user not found message if
 *             such applies
 */
private String queryFlickrOnUsername(Flickr flickr, String presumedUsername) throws FlickrException
{
	String flickrUserId = null;
	PeopleInterface pi = flickr.getPeopleInterface();
	User flickrUser = null;
	try
	{
		flickrUser = pi.findByUsername(presumedUsername);
	}
	catch( FlickrException fe ) // NOSONAR - throw these in the raw, wrap
								// any others
	{
		throw fe;
	}
	catch( Exception e )
	{
		throw Throwables.propagate(e);
	}

	if( flickrUser != null )
	{
		flickrUserId = flickrUser.getId();
	}

	return flickrUserId;
}
 
开发者ID:equella,项目名称:Equella,代码行数:35,代码来源:FlickrServiceImpl.java


注:本文中的com.flickr4java.flickr.Flickr.getPeopleInterface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。