CloudConvert Client

A Java Wrapper for the CloudConvert API.

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

org.aioobe.cloudconvert
ArtifactId

ArtifactId

client
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

CloudConvert Client
A Java Wrapper for the CloudConvert API.
Project URL

Project URL

http://github.com/aioobe/cloudconvert
Source Code Management

Source Code Management

http://github.com/aioobe/cloudconvert

Download client

How to add to project

<!-- https://jarcasting.com/artifacts/org.aioobe.cloudconvert/client/ -->
<dependency>
    <groupId>org.aioobe.cloudconvert</groupId>
    <artifactId>client</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.aioobe.cloudconvert/client/
implementation 'org.aioobe.cloudconvert:client:1.1'
// https://jarcasting.com/artifacts/org.aioobe.cloudconvert/client/
implementation ("org.aioobe.cloudconvert:client:1.1")
'org.aioobe.cloudconvert:client:jar:1.1'
<dependency org="org.aioobe.cloudconvert" name="client" rev="1.1">
  <artifact name="client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.aioobe.cloudconvert', module='client', version='1.1')
)
libraryDependencies += "org.aioobe.cloudconvert" % "client" % "1.1"
[org.aioobe.cloudconvert/client "1.1"]

Dependencies

compile (5)

Group / Artifact Type Version
org.glassfish.jersey.core : jersey-client jar 2.10
com.fasterxml.jackson.core : jackson-databind jar 2.4.0
com.fasterxml.jackson.core : jackson-core jar 2.4.0
org.glassfish.jersey.media : jersey-media-json-jackson jar 2.10
org.glassfish.jersey.media : jersey-media-multipart jar 2.10

Project Modules

There are no modules declared in this project.

CloudConvert Java API

Jersey-client based implementation of the CloudConvert.com REST API.

Dependency

<dependency>
    <groupId>org.aioobe.cloudconvert</groupId>
    <artifactId>client</artifactId>
    <version>1.1</version>
</dependency>

Example Usage

// Create service object
CloudConvertService service = new CloudConvertService("<api key>");

// Create conversion process
ConvertProcess process = service.startProcess("jpg", "png");

// Perform conversion
process.startConversion(new File("test.jpg"));

// Wait for result
ProcessStatus status;
waitLoop: while (true) {
    status = process.getStatus();
    
    switch (status.step) {
    case FINISHED: break waitLoop;
    case ERROR: throw new RuntimeException(status.message);
    }
    
    // Be gentle
    Thread.sleep(200);
}

// Download result
service.download(status.output.url, new File("output.png"));

// Clean up
process.delete();

Versions

Version
1.1
1.0