Guest User

Untitled

a guest
Aug 19th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. // Connect to the API
  2. String domain = "saxon.socrata.com";
  3. String username = "<youremail>";
  4. String password = "<yourpass>";
  5. String appToken = "<yourapptoken>";
  6. Connection connection = new HttpConnection(domain, username, password, appToken);
  7.  
  8. // Connect to the view
  9. View view = View.find("ry7h-n6bk", connection);
  10.  
  11. // Retrieve the first 10 rows
  12. List<View.Row> rows = view.getRows(0, 10, connection);
  13.  
  14. // Print them out
  15. for(View.Row r : rows) {
  16. System.out.println("Row: " + r.getDataFieldsForSerialization());
  17. }
Add Comment
Please, Sign In to add comment