Package com.github.jreddit.entity

Examples of com.github.jreddit.entity.Submission


          }
          JSONArray array = (JSONArray) ((JSONObject) object.get("data")).get("children");

          // Iterate over the submission results
          JSONObject data;
          Submission submission;
          for (Object anArray : array) {
              data = (JSONObject) anArray;
             
              // Make sure it is of the correct kind
              String kind = safeJsonToString(data.get("kind"));
              if (kind.equals(Kind.LINK.value())) {
               
                // Create and add submission
                data = ((JSONObject) data.get("data"));
                submission = new Submission(data);
                submission.setUser(user);
                submissions.add(submission);
             
              }
             
          }
View Full Code Here

TOP

Related Classes of com.github.jreddit.entity.Submission

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.