@@ -0,0 +1,1027 @@
+package api.torrents.torrents;%0A%0Aimport api.son.MySon;%0Aimport api.soup.MySoup;%0A%0A/**%0A * A standalone torrent request. contains information about the group the torrent%0A * is in and the torrent itself%0A */%0Apublic class Torrent %7B%0A%09private String status;%0A%09private Response response;%0A%0A%09public static Torrent fromId(int id)%7B%0A%09%09String url = %22ajax.php?action=torrent&id=%22 + id + %22&auth=%22 + MySoup.getAuthKey();%0A%09%09return (Torrent)MySon.toObject(url, Torrent.class);%0A%09%7D%0A%0A%09public boolean getStatus()%7B%0A%09%09return status.equalsIgnoreCase(%22success%22);%0A%09%7D%0A%0A%09public Group getGroup()%7B%0A%09%09return response.group;%0A%09%7D%0A%0A%09public Torrents getTorrent()%7B%0A%09%09return response.torrent;%0A%09%7D%0A%0A%09@Override%0A%09public String toString()%7B%0A%09%09return %22Torrent %5Bgroup=%22 + response.group + %22, torrent=%22 + response.torrent + %22%5D%22;%0A%09%7D%0A%0A%09/**%0A%09 * The API response returned for a single torrent%0A%09 */%0A%09private static class Response %7B%0A%09%09/**%0A%09%09 * Information about the group the torrent is in%0A%09%09 */%0A%09%09public Group group;%0A%09%09/**%0A%09%09 * The torrent itself%0A%09%09 */%0A%09%09public Torrents torrent;%0A%09%7D%0A%7D%0A

Add support for loading a single torrent by id