Package com.google.gdata.data.extensions

Examples of com.google.gdata.data.extensions.Rating


        String eventType = event.getUserEventType().toString();
        String author = event.getAuthors().get(0).getName();
        String videoId = event.getVideoId();
        String username = event.getUsername();
        String title = event.getTitle().getPlainText();
        Rating rating = event.getRating();
        Date updated = new Date(event.getUpdated().getValue());
       
        JSONObject json = new JSONObject();
        try {
          json.put("event", eventType);
          json.put("title", title);
          if(username != null) {
            json.put("username", username);
          }
          if(rating != null) {
            json.put("rating", rating.getValue());
          }
          if(videoId != null) {
            json.put("videoid", videoId);
          }
        } catch (JSONException e) {
View Full Code Here


  private static void addRating(BooksService service,
                                String volumeId, int value)
      throws IOException, ServiceException {
    VolumeEntry newEntry = new VolumeEntry();
    newEntry.setId(volumeId);
    Rating rating = new Rating();
    rating.setMin(1);
    rating.setMax(5);
    rating.setValue(value);
    newEntry.setRating(rating);
    try {
      service.insert(new URL(USER_ANNOTATION_FEED), newEntry);
    } catch (ServiceException se) {
      System.out.println("There was an error adding your rating.\n");
View Full Code Here

TOP

Related Classes of com.google.gdata.data.extensions.Rating

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.