Skip to content

Commit

Permalink
Fixes inconsistency in javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
louismrose committed Apr 15, 2024
1 parent c049209 commit caac871
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions src/main/java/com/zamzar/api/ZamzarClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
* <pre>
* ZamzarClient zamzar = new ZamzarClient("YOUR_API_KEY_GOES_HERE");
*
* client
* zamzar
* .convert(new File("path/to/source.pdf"), "jpg")
* .awaitOrThrow()
* .download(new File("path/to/destination.jpg"));
* .store(new File("path/to/destination.jpg"));
* </pre>
*
* @see <a href="https://developers.zamzar.com/docs">Zamzar API Documentation</a>
Expand Down Expand Up @@ -157,17 +156,15 @@ public ZamzarClient(String apiKey, URI baseUrl, OkHttpClient transport) {
}

/**
* Converts a local file to the specified format. Call {@link JobManager#awaitOrThrow()} on the result
* to wait for the conversion to complete.
* Converts a local file to the specified format, blocking until the conversion is complete.
* <p>
* Example usage:
* <pre>
* ZamzarClient zamzar = new ZamzarClient("YOUR_API_KEY_GOES_HERE");
*
* zamzar
* .convert(new File("path/to/source.pdf"), "jpg")
* .awaitOrThrow()
* .download(new File("path/to/destination.jpg"))
* .store(new File("path/to/destination.jpg"))
* .deleteAllFiles();
* </pre>
*/
Expand All @@ -176,8 +173,8 @@ public JobManager convert(File source, String targetFormat) throws ApiException
}

/**
* Converts a local file to the specified format using a custom job builder. Call {@link JobManager#awaitOrThrow()}
* on the result to wait for the conversion to complete.
* Converts a local file to the specified format using a custom job builder, blocking until the conversion is
* complete.
* <p>
* Example usage:
* <pre>
Expand All @@ -189,7 +186,6 @@ public JobManager convert(File source, String targetFormat) throws ApiException
* "jpg",
* builder -> builder.exportingTo("s3://my-bucket/path/to/destination.jpg")
* )
* .awaitOrThrow()
* .deleteAllFiles();
* </pre>
*/
Expand All @@ -198,17 +194,15 @@ public JobManager convert(File source, String targetFormat, JobBuilder.Modifier
}

/**
* Converts a file already present on Zamzar's API servers to the specified format. Call {@link JobManager#awaitOrThrow()}
* on the result to wait for the conversion to complete.
* Converts a file already present on Zamzar's API servers to the specified format.
* <p>
* Example usage:
* <pre>
* ZamzarClient zamzar = new ZamzarClient("YOUR_API_KEY_GOES_HERE");
*
* zamzar
* .convert(123, "jpg")
* .awaitOrThrow()
* .download(new File("path/to/destination.jpg"))
* .store(new File("path/to/destination.jpg"))
* .deleteTargetFiles();
* </pre>
*/
Expand All @@ -218,7 +212,6 @@ public JobManager convert(Integer sourceId, String targetFormat) throws ApiExcep

/**
* Converts a file already present on Zamzar's API servers to the specified format using a custom job builder.
* Call {@link JobManager#awaitOrThrow()} on the result to wait for the conversion to complete.
* <p>
* Example usage:
* <pre>
Expand All @@ -230,7 +223,6 @@ public JobManager convert(Integer sourceId, String targetFormat) throws ApiExcep
* "jpg",
* builder -> builder.exportingTo("s3://my-bucket/path/to/destination.jpg")
* )
* .awaitOrThrow()
* .deleteTargetFiles();
* </pre>
*/
Expand All @@ -239,17 +231,15 @@ public JobManager convert(Integer sourceId, String targetFormat, JobBuilder.Modi
}

/**
* Converts a file at the given URL to the specified format. Call {@link JobManager#awaitOrThrow()} on the result
* to wait for the conversion to complete.
* Converts a file at the given URL to the specified format.
* <p>
* Example usage:
* <pre>
* ZamzarClient zamzar = new ZamzarClient("YOUR_API_KEY_GOES_HERE");
*
* zamzar
* .convert(new URL("https://example.com/source.pdf"), "jpg")
* .awaitOrThrow()
* .download(new File("path/to/destination.jpg"))
* .store(new File("path/to/destination.jpg"))
* .deleteAllFiles();
* </pre>
*/
Expand All @@ -258,8 +248,7 @@ public JobManager convert(URI source, String targetFormat) throws ApiException {
}

/**
* Converts a file at the given URL to the specified format using a custom job builder. Call {@link JobManager#awaitOrThrow()}
* on the result to wait for the conversion to complete.
* Converts a file at the given URL to the specified format using a custom job builder.
* <p>
* Example usage:
* <pre>
Expand All @@ -271,7 +260,6 @@ public JobManager convert(URI source, String targetFormat) throws ApiException {
* "jpg",
* builder -> builder.exportingTo("s3://my-bucket/path/to/destination.jpg")
* )
* .awaitOrThrow()
* .deleteAllFiles();
* </pre>
*/
Expand Down

0 comments on commit caac871

Please sign in to comment.