303304305306307308309310311312
//formParams.add(new BasicNameValuePair(TwitterAPI.SCREEN_NAME, screenName)); //setEntity(request, formParams); JSONObject object = requestJSONObject(request); try { return new User(object); } catch (TweetParseException e) { throw new TwitterClientException(e); } }
528529530531532533534535536537538
List<User> users = new LinkedList<User>(); try { for (int i = 0; i < array.length(); i++) { try { users.add(new User(array.getJSONObject(i))); } catch (TweetParseException e) { throw new TwitterClientException(e); } } } catch (JSONException e) {
543544545546547548549550551552553
private List<User> constructUserListFromIDs(final JSONArray array) throws TwitterClientException { List<User> users = new LinkedList<User>(); try { for (int i = 0; i < array.length(); i++) { users.add(new User(array.getInt(i))); } } catch (JSONException e) { throw new TwitterClientException(e); } return users;
710711712713714715716717718719
TwitLogic.setConfiguration(props); CustomTwitterClient client = new CustomTwitterClient(); //client.processSampleStream(new NullHandler<Tweet, TweetHandlerException>()); List<User> l = client.getFollowees(new User("joshsh", 7083182), -1); for (User u : l) { System.out.println("" + u); } }
51525354555657
assertExpected("@joshsh (who kNows @xixiluo)", new Triple(JOSHSH_PERSON, KNOWS, XIXILUO_PERSON)); // Usernames are case-sensitive. assertExpected("@joshsh (who knows @XixiLuo)", new Triple(JOSHSH_PERSON, KNOWS, new User("XixiLuo").getHeldBy())); }
5556575859606162636465
DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String l; while ((l = br.readLine()) != null) { String id = l.trim(); User user = new User(id); try { if (reverse) { for (User follower : client.getFollowers(user, -1)) { ps.println(follower.getId() + "\t" + id); }
5758596061626364656667
try { ValueFactory vf = store.getSail().getValueFactory(); SailConnection sc = c.getSailConnection(); long id = Long.valueOf(selfURI.substring(selfURI.lastIndexOf('/') + 1, selfURI.lastIndexOf('.'))); User user = new User(id); URI personURI = vf.createURI(PersistenceContext.uriOf(new Person(user))); // check timestamp long lastUpdate = -1; CloseableIteration<? extends Statement, SailException> iter