Skip to content

dro1dwarrior/WhatAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatAPI

This is a Java API for What.CD that provides a wrapper around the AJAX API of Gazelle. The What.CD Android App heavily utilizes this API. Please don't make more than 1 request to the site per second and don't do anything malicious or there will be consequences.

If you have any questions contact Gwindow in #what.cd-code or through Github.

Licensed under the 2-Clause BSD License, see LICENSE for full terms.

Example

//set the site and login
MySoup.setSite("ssl.what.cd");
MySoup.login("login.php", username, password);
//create an object
User user = User.userFromId(id);
//you now have an object to work with, awesome right?
System.out.println(user); //this will print all the values that the object contains
//Most classes also have extra methods to do special stuff, like sending messages or downloading files
user.sendMessage(subject, body);

And that is a basic example of how you can use the api.

Java documentation: http://gwindow.github.com/WhatAPI/

List of JSON pages present on What.CD and Gazelle

Index

ajax.php?action=index

The most important page, provides basic info such as passkey, authkey, and U/D/R

User Profile

ajax.php?action=user&id=<User ID>

Inbox and Conversation ajax.php?action=inbox

ajax.php?action=inbox&type=viewconv&id=<Message Id>

Top 10

ajax.php?action=top10&type=<Type>&limit=<Limit>

Type = torrents, tags, users.

Limit = 10,25,100; if no limit is specified defaults to 25.

User Search

ajax.php?action=usersearch&search=<Search Term>

Requests Search

ajax.php?action=requests&search=<Search Term>

ajax.php?action=requests&search=<Search Term>&tag=<Tags>

If no search term then latest requests will be listed.

Torrent Search

ajax.php?action=browse&searchstr=<Search Term>

ajax.php?action=browse&searchstr=<Search Term>&taglist=<Tags>&tags_type=1

Searches also take all the advanced search parameters but there are too many to include, check Gazelle.

Bookmarks

ajax.php?action=bookmarks&type=<Type>

Type = torrents, artists

Subscriptions

ajax.php?action=subscriptions

Forums

ajax.php?action=forum&type=main

ajax.php?action=forum&type=viewforum&forumid=<Forum Id>

ajax.php?action=forum&type=viewthread&threadid=<Thread Id>&page=<Page>

ajax.php?action=forum&type=viewthread&threadid=<Thread Id>&postid=<Post Id>

Artist

ajax.php?action=artist&id=<Artist Id>

Torrent Group

ajax.php?action=torrentgroup&id=<Torrent Group Id>

Request

ajax.php?action=request&id=<Request Id>

Notifications

ajax.php?action=notifications&page=<Page>

Rippy

ajax.php?action=rippy&format=json

About

Java API to be used with Gazelle, specifically What.CD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published