use of me.perrycate.groupmeutils.data.Group in project groupme-utils by TheGuyWithTheFace.
the class Stats method main.
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
// User auth
System.out.println("Please enter your GroupMe API Token: ");
GroupMe api = new GroupMe(s.nextLine());
// Select group
System.out.println("Fetching groups list...");
Group[] groups = api.getGroups();
for (int i = 0; i < groups.length; i++) {
System.out.format("[%d] %s\n", i, groups[i].getName());
}
System.out.print("Please select a group to dump: ");
Group selectedGroup = groups[Integer.parseInt(s.nextLine())];
System.out.println("Selected \"" + selectedGroup.getName() + "\".");
// Create output file
System.out.println("Please enter a new file to save data to: ");
File out = new File(s.nextLine());
// Analyze and dump
Stats stats = new Stats(api, selectedGroup, out);
stats.write();
s.close();
}
use of me.perrycate.groupmeutils.data.Group in project groupme-utils by TheGuyWithTheFace.
the class ListGroups method main.
public static void main(String[] args) {
System.out.println("Please enter your groupme API Token: ");
Scanner s = new Scanner(System.in);
String token = s.nextLine();
System.out.println("Fetching groups...");
GroupMe groupme = new GroupMe(token);
Group[] groups = groupme.getGroups();
for (int i = 0; i < groups.length; i++) {
System.out.println("Name: " + groups[i].getName());
System.out.print("Members: ");
Member[] members = groups[i].getMembers();
for (int j = 0; j < members.length; j++) {
System.out.print(members[j].getNickname() + " ");
}
System.out.println();
}
s.close();
}
use of me.perrycate.groupmeutils.data.Group in project groupme-utils by TheGuyWithTheFace.
the class TestDump method main.
public static void main(String[] args) {
// required info
String token = "YOUR API TOKEN HERE";
String groupId = "GROUP ID HERE";
GroupMe groupme = new GroupMe(token);
Group group = groupme.getGroup(groupId);
Dumper dumper = new Dumper(groupme, group);
dumper.dump(new File("testdump.txt"));
System.out.println("Complete");
}
Aggregations