Gwindow/WhatAPI


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

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.Gwindow:WhatAPI:'
	}
	dependencies {
		implementation("com.github.Gwindow:WhatAPI:")
	}
	<dependency>
	    <groupId>com.github.Gwindow</groupId>
	    <artifactId>WhatAPI</artifactId>
	    <version></version>
	</dependency>

                            
    libraryDependencies += "com.github.Gwindow" % "WhatAPI" % ""
        
        

                            
    :dependencies [[com.github.Gwindow/WhatAPI ""]]
        
        

Readme


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 follow the site API rules and don't use this library or the API for malicious or bannable offenses or to make more than 5 requests every 10 seconds.

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

Dependencies

Example

//set the site and login, e.g. to a local Gazelle install
MySoup.setSite("localhost");
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);

Documentation

Contributing

We're following the Git branching model outlined in this post for development. Contact us for write permissions or fork and submit a pull request when you've made your changes.

Questions? Contact Gwindow or Twinklebear through GitHub, the site, or in #whatAndroid or #code on the site irc.