Java Wrapper for the https://paste.ee/ API
repositories {
mavenCentral()
}
dependencies {
compile 'fr.minuskube:jpastee:1.0.2'
}
<dependency>
<groupId>fr.minuskube</groupId>
<artifactId>jpastee</artifactId>
<version>1.0.2</version>
</dependency>
You can download the latest version on the Releases page on Github.
JPastee pastee = new JPastee("YOUR_API_KEY");
Paste paste = Paste.builder()
.description("My super paste!")
.addSection(Section.builder()
.name("An awesome section.")
.contents("This is a test made using the JPastee API.")
.syntax(pastee.getSyntaxFromName("java").get())
.build())
.build();
SubmitResponse resp = pastee.submit(paste);
if(resp.isSuccess())
System.out.println("The paste was successfully submitted!");
else
System.out.println("The paste could not be submitted... " + resp.getErrorString());