TA-GM模块
- API version: 1.0-SNAPSHOT
- Build date: 2025-04-09T15:24:51.529177+08:00[Asia/Shanghai]
TA-GM API接口
For more information, please visit https://www.trustasia.com
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.trustasia</groupId>
<artifactId>gm-sdk-java</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'gm-sdk-java' jar has been published to maven central.
mavenLocal() // Needed if the 'gm-sdk-java' jar has been published to the local maven repo.
}
dependencies {
implementation "com.trustasia:gm-sdk-java:1.0.0"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/gm-sdk-java-1.0.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import com.trustasia.tagm.core.ApiClient;
import com.trustasia.tagm.core.ApiException;
import com.trustasia.tagm.core.Configuration;
import com.trustasia.tagm.core.auth.*;
import com.trustasia.tagm.core.models.*;
import com.trustasia.tagm.api.TestApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://localhost:9090");
TestApi apiInstance = new TestApi(defaultClient);
Object name = null; // Object | 名称
Object age = null; // Object | 年龄
try {
ResponseResultTestVO result = apiInstance.getInfo(name, age);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TestApi#getInfo");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://localhost:9090
Class | Method | HTTP request | Description |
---|---|---|---|
TestApi | getInfo | GET /openApi/test/info |
Endpoints do not require authorization.
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.