Skip to content

Instantly share code, notes, and snippets.

@chrismetcalf
Created November 5, 2011 18:46
Show Gist options
  • Save chrismetcalf/1341870 to your computer and use it in GitHub Desktop.
Save chrismetcalf/1341870 to your computer and use it in GitHub Desktop.
// Connect to the API
String domain = "saxon.socrata.com";
String username = "<youremail>";
String password = "<yourpass>";
String appToken = "<yourapptoken>";
Connection connection = new HttpConnection(domain, username, password, appToken);
// Connect to the view
View view = View.find("ry7h-n6bk", connection);
// Retrieve the first 10 rows
List<View.Row> rows = view.getRows(0, 10, connection);
// Print them out
for(View.Row r : rows) {
System.out.println("Row: " + r.getDataFieldsForSerialization());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment