Package com.google.gdata.data.photos

Examples of com.google.gdata.data.photos.UserFeed


 
  @Override
  public List<AlbumEntry> selectAlbums() throws IOException,
      ServiceException {
    URL feedUrl = new URL(getPicasaURL() + "?kind=album");
    UserFeed feed = getPicasawebService().getFeed(feedUrl, UserFeed.class);
    return feed.getAlbumEntries();
  }
View Full Code Here


    service.setAuthSubToken(token);
  }

  public String getCurrentUsername() throws IOException, ServiceException {
    try {
      UserFeed userFeed = service.getFeed(new URL(USER_FEED_URL), UserFeed.class);
      return userFeed.getUsername();
    } catch (MalformedURLException e) {
      LOG.log(Level.WARNING, "", e);
    }

    return null;
View Full Code Here

    try {
      URL feedUrl = new URL(ALBUM_FEED_URL);

      while (feedUrl != null) {
        UserFeed albumFeed = service.getFeed(feedUrl, UserFeed.class);
        albums.addAll(albumFeed.getAlbumEntries());
       
        Link nextLink = albumFeed.getNextLink();
        if (nextLink == null) {
          feedUrl = null;
        } else {
          feedUrl = new URL(nextLink.getHref());
        }
View Full Code Here

      GoogleService.CaptchaRequiredException cre
      ) throws InvalidCredentialsException {
    return serviceHandler.handleCaptcha(service, username, password, cre);
  }
  public UserFeed getMetaFeed() {
    UserFeed metaFeed = null;
    try {
      metaFeed = service.getFeed(feedUrl, UserFeed.class);
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

   
    QuickPB.initServices(prefs.getUsername());
    QuickPB.authenticateServices();
   
    Feed bloggerBlogList = bloggerServiceHandler.getMetaFeed();
    UserFeed picasaAlbumList = picasaServiceHandler.getMetaFeed();
    if(!useSavedPreferences) {
      QuickPB.getBlogInfoFromUser(bloggerBlogList);
    }
    album = picasaServiceHandler.findCorrespondingPicasaAlbum(prefs.getBlogName(), picasaAlbumList);
    if(album == null)
View Full Code Here

   * Retrieves the albums for the given user.
   */
  public List<AlbumEntry> getAlbums(String username) throws IOException, ServiceException {

    String albumUrl = PWA_API_PREFIX + username;
    UserFeed userFeed = getFeed(albumUrl, UserFeed.class);

    List<GphotoEntry> entries = userFeed.getEntries();
    List<AlbumEntry> albums = new ArrayList<AlbumEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();
      if (adapted instanceof AlbumEntry) {
        albums.add((AlbumEntry) adapted);
View Full Code Here

   * Retrieves the tags for the given user. These are tags aggregated across
   * the entire account.
   */
  public List<TagEntry> getTags(String uname) throws IOException, ServiceException {
    String tagUrl = PWA_API_PREFIX + uname + "?kind=tag";
    UserFeed userFeed = getFeed(tagUrl, UserFeed.class);

    List<GphotoEntry> entries = userFeed.getEntries();
    List<TagEntry> tags = new ArrayList<TagEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();
      if (adapted instanceof TagEntry) {
        tags.add((TagEntry) adapted);
View Full Code Here

   */
  public List<AlbumEntry> getAlbums(String username) throws IOException,
      ServiceException {

    String albumUrl = API_PREFIX + username;
    UserFeed userFeed = getFeed(albumUrl, UserFeed.class);

    List<GphotoEntry> entries = userFeed.getEntries();
    List<AlbumEntry> albums = new ArrayList<AlbumEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();
      if (adapted instanceof AlbumEntry) {
        albums.add((AlbumEntry) adapted);
View Full Code Here

   * the entire account.
   */
  public List<TagEntry> getTags(String uname) throws IOException,
      ServiceException {
    String tagUrl = API_PREFIX + uname + "?kind=tag";
    UserFeed userFeed = getFeed(tagUrl, UserFeed.class);

    List<GphotoEntry> entries = userFeed.getEntries();
    List<TagEntry> tags = new ArrayList<TagEntry>();
    for (GphotoEntry entry : entries) {
      GphotoEntry adapted = entry.getAdaptedEntry();
      if (adapted instanceof TagEntry) {
        tags.add((TagEntry) adapted);
View Full Code Here

      PicasawebService service = new PicasawebService("Kirin-App");
      service.setAuthSubToken(this.getThreadLocalRequest().getSession().getAttribute("sessionToken").toString());

      URL feedUrl = new URL("https://picasaweb.google.com/data/feed/api/user/" + userId + "?kind=album");

      UserFeed userFeed = service.getFeed(feedUrl, UserFeed.class);
      AlbumModel albumModel = null;

      for (AlbumEntry albumEntry : userFeed.getAlbumEntries()) {
        albumModel = new AlbumModel();
        albumModel.setAlbumid(albumEntry.getGphotoId());
        albumModel.setName(albumEntry.getTitle().getPlainText());
        albumModel.setUpdate(albumEntry.getUpdated().toString());
        result.add(albumModel);
View Full Code Here

TOP

Related Classes of com.google.gdata.data.photos.UserFeed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.