MinusKube / JPastee

Java Wrapper for the https://paste.ee/ API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JPastee

Java Wrapper for the https://paste.ee/ API

Installation

Gradle

repositories {
    mavenCentral()
}

dependencies {
    compile 'fr.minuskube:jpastee:1.0.2'
}

Maven

<dependency>
  <groupId>fr.minuskube</groupId>
  <artifactId>jpastee</artifactId>
  <version>1.0.2</version>
</dependency>

Manually

You can download the latest version on the Releases page on Github.

Example

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());

About

Java Wrapper for the https://paste.ee/ API

License:GNU General Public License v3.0


Languages

Language:Java 100.0%