|
1 | | -# groupdocs-conversion-cloud-java |
2 | | -Java library for communicating with the GroupDocs.Conversion Cloud API |
| 1 | +# GroupDocs.Conversion Cloud SDK for Java |
| 2 | +This repository contains GroupDocs.Conversion Cloud SDK for Java source code. This SDK allows you to work with GroupDocs.Conversion Cloud REST APIs in your Java applications. |
| 3 | + |
| 4 | +## Requirements |
| 5 | + |
| 6 | +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. |
| 7 | + |
| 8 | +## Installation |
| 9 | + |
| 10 | +To install the API client library to your local Maven repository, simply execute: |
| 11 | + |
| 12 | +```shell |
| 13 | +mvn install |
| 14 | +``` |
| 15 | + |
| 16 | +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: |
| 17 | + |
| 18 | +```shell |
| 19 | +mvn deploy |
| 20 | +``` |
| 21 | + |
| 22 | +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. |
| 23 | + |
| 24 | +### Maven users |
| 25 | + |
| 26 | +Add following repository and dependency to your project's POM |
| 27 | + |
| 28 | +```xml |
| 29 | +<repository> |
| 30 | + <id>groupdocs-artifact-repository</id> |
| 31 | + <name>GroupDocs Artifact Repository</name> |
| 32 | + <url>https://repository.groupdocs.cloud/repo</url> |
| 33 | +</repository> |
| 34 | +``` |
| 35 | + |
| 36 | +```xml |
| 37 | +<dependency> |
| 38 | + <groupId>com.groupdocs</groupId> |
| 39 | + <artifactId>groupdocs-conversion-cloud</artifactId> |
| 40 | + <version>19.3</version> |
| 41 | + <scope>compile</scope> |
| 42 | +</dependency> |
| 43 | +``` |
| 44 | + |
| 45 | +### Others |
| 46 | + |
| 47 | +At first generate the JAR by executing: |
| 48 | + |
| 49 | + mvn package |
| 50 | + |
| 51 | +Then manually install the following JARs: |
| 52 | + |
| 53 | +* target/groupdocs-conversion-cloud-19.3.jar |
| 54 | +* target/lib/*.jar |
| 55 | + |
| 56 | +## Getting Started |
| 57 | + |
| 58 | +Please follow the [installation](#installation) instruction and execute the following Java code: |
| 59 | + |
| 60 | +```java |
| 61 | +import com.groupdocs.cloud.conversion.client.*; |
| 62 | +import com.groupdocs.cloud.conversion.model.*; |
| 63 | +import com.groupdocs.cloud.conversion.api.ConversionApi; |
| 64 | + |
| 65 | +import java.util.*; |
| 66 | + |
| 67 | +public class ApiExample { |
| 68 | + |
| 69 | + public static void main(String[] args) { |
| 70 | + //TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required). |
| 71 | + String appSid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"; |
| 72 | + String appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; |
| 73 | + |
| 74 | + Configuration configuration = new Configuration(appSid, appKey); |
| 75 | + |
| 76 | + ConversionApi conversionApi = new ConversionApi(configuration); |
| 77 | + |
| 78 | + try { |
| 79 | + FormatsResult response = conversionApi.getSupportedFileFormats(); |
| 80 | + for (Format format : response.getFormats()) { |
| 81 | + System.out.println(format.getFileFormat()); |
| 82 | + } |
| 83 | + } catch (ApiException e) { |
| 84 | + System.err.println("Exception when calling FileApi#copyFile"); |
| 85 | + e.printStackTrace(); |
| 86 | + } |
| 87 | + } |
| 88 | +} |
| 89 | +``` |
| 90 | + |
| 91 | +## Licensing |
| 92 | +All GroupDocs.Conversion Cloud SDKs are licensed under [MIT License](LICENSE). |
| 93 | + |
| 94 | +## Resources |
| 95 | ++ [**Website**](https://www.groupdocs.cloud) |
| 96 | ++ [**Product Home**](https://products.groupdocs.cloud/conversion) |
| 97 | ++ [**Documentation**](https://docs.groupdocs.cloud/display/conversioncloud/Home) |
| 98 | ++ [**Free Support Forum**](https://forum.groupdocs.cloud/c/conversion) |
| 99 | ++ [**Blog**](https://blog.groupdocs.cloud/category/conversion) |
| 100 | + |
| 101 | +## Contact Us |
| 102 | +Your feedback is very important to us. Please feel free to contact us using our [Support Forums](https://forum.groupdocs.cloud/c/conversion). |
0 commit comments