Examples of AlbumEntry


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

    albumQuery.setFields(fields);

    AlbumFeed feed = service.query(albumQuery, AlbumFeed.class);
    for (GphotoEntry entry : feed.getEntries()) {
      if (entry instanceof AlbumEntry) {
        AlbumEntry albumEntry = (AlbumEntry) entry;
        OUT.println(albumEntry.getGphotoId() + ":"
            + albumEntry.getTitle().getPlainText()
            + " (" + albumEntry.getLocation()  + ")");
      }
    }
  }
View Full Code Here

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

    // Get the current album entry
    String albumEntryUrl = API_PREFIX + uname + "/" + albumId;
    String fields = "@gd:etag,gphoto:location";
    Query patchQuery = new Query(new URL(albumEntryUrl));
    patchQuery.setFields(fields);
    AlbumEntry entry = service.getEntry(patchQuery.getUrl(), AlbumEntry.class);
    OUT.println("Current location: " + entry.getLocation());

    // Update the location in the album entry
    OUT.println("Specify new location: ");
    String newLocation = IN.readLine();
    entry.setLocation(newLocation);
    entry.setSelectedFields("gphoto:location");
    AlbumEntry updated = service.patch(new URL(albumEntryUrl), fields, entry);
    OUT.println("Location set to: " + updated.getLocation());
  }
View Full Code Here

Examples of com.linkedin.restli.example.AlbumEntry

      final long albumId = 7;

      final CompoundKey key = new CompoundKey();
      key.append("photoId", photoId);
      key.append("albumId", albumId);
      final AlbumEntry entry = new AlbumEntry();
      entry.setPhotoId(photoId);
      entry.setAlbumId(albumId);
      entry.setAddTime(r.nextInt(Integer.MAX_VALUE));
      _data.put(key, entry);
    }
  }
View Full Code Here

Examples of com.linkedin.restli.example.AlbumEntry

  private CompoundKey[] _keys;

  private void makeData()
  {
    _entries =
        new AlbumEntry[] { new AlbumEntry().setAddTime(1), new AlbumEntry().setAddTime(2),
            new AlbumEntry().setAddTime(3), new AlbumEntry().setAddTime(4),
            new AlbumEntry().setAddTime(5) };
    _keys =
        new CompoundKey[] { new CompoundKey().append("photoId", 1L).append("albumId", 1L),
            new CompoundKey().append("photoId", 2L).append("albumId", 1L),
            new CompoundKey().append("photoId", 3L).append("albumId", 1L),
            new CompoundKey().append("photoId", 1L).append("albumId", 2L),
View Full Code Here

Examples of com.linkedin.restli.example.AlbumEntry

  @Test(expectedExceptions = RestLiServiceException.class)
  public void testBadUpdatePhotoId()
  {
    // photo 100 doesn't exist
    CompoundKey key = new CompoundKey().append("photoId", 100L).append("albumId", 1L);
    AlbumEntry entry = new AlbumEntry().setAddTime(4);
    _entryRes.update(key, entry);
  }
View Full Code Here

Examples of com.linkedin.restli.example.AlbumEntry

  @Test(expectedExceptions = RestLiServiceException.class)
  public void testBadUpdateAlbumId()
  {
    // album 100 doesn't exist
    CompoundKey key = new CompoundKey().append("photoId", 1L).append("albumId", 100L);
    AlbumEntry entry = new AlbumEntry().setAddTime(4);
    _entryRes.update(key, entry);
  }
View Full Code Here

Examples of com.linkedin.restli.example.AlbumEntry

  @Test(expectedExceptions = RestLiServiceException.class)
  public void testBadUpdateIdsInEntry()
  {
    // shouldn't be able to put IDs in update entry
    CompoundKey key = new CompoundKey().append("photoId", 1L).append("albumId", 1L);
    AlbumEntry entry = new AlbumEntry().setAddTime(4).setPhotoId(1);
    _entryRes.update(key, entry);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.