Skip to content

Commit 975f7da

Browse files
shuakamidevin-ai-integration[bot]
authored andcommitted
Add LICENSE, AGENTS.md, and richer package metadata
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 734447b commit 975f7da

3 files changed

Lines changed: 115 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# AGENTS.md — uapi-sdk-java
2+
3+
This file tells AI coding agents how to use the **official Java SDK** for
4+
the [uapis.cn](https://uapis.cn) public API platform.
5+
6+
## What this artifact is
7+
8+
Idiomatic Java client for UAPI. Generated from the live OpenAPI 3.1 spec at
9+
<https://uapis.cn/openapi.json> — class names, method names, and parameter
10+
shapes track the real API.
11+
12+
## Install
13+
14+
Maven (`pom.xml`):
15+
16+
```xml
17+
<dependency>
18+
<groupId>cn.uapis</groupId>
19+
<artifactId>uapi-sdk-java</artifactId>
20+
<version>0.1.17</version>
21+
</dependency>
22+
```
23+
24+
Gradle (`build.gradle.kts`):
25+
26+
```kotlin
27+
implementation("cn.uapis:uapi-sdk-java:0.1.17")
28+
```
29+
30+
## Quick start
31+
32+
```java
33+
import cn.uapis.UapiClient;
34+
import cn.uapis.api.MiscApi;
35+
import cn.uapis.model.GetMiscWeatherRequest;
36+
37+
UapiClient client = new UapiClient("https://uapis.cn");
38+
MiscApi misc = new MiscApi(client);
39+
var resp = misc.getMiscWeather(new GetMiscWeatherRequest().city("北京"));
40+
System.out.println(resp);
41+
```
42+
43+
The SDK is grouped by tag (`MiscApi`, `NetworkApi`, `TextApi`, `ImageApi`,
44+
`SocialApi`, `TranslateApi`, `SearchApi`, …). Method names match the
45+
OpenAPI `operationId`, camelCased.
46+
47+
## Authentication
48+
49+
Free-tier endpoints work with no key. Paid endpoints take a key:
50+
51+
```java
52+
UapiClient client = new UapiClient("https://uapis.cn", "sk_…");
53+
```
54+
55+
## Errors
56+
57+
Methods throw `UapiApiException` (subclass of `IOException`) on non-2xx
58+
responses. The exception carries `code`, `error`, and `requestId` fields.
59+
Surface `error` verbatim.
60+
61+
## Rate limits
62+
63+
Headers `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`,
64+
`Retry-After` are exposed on response headers. Honor them.
65+
66+
## Related repos
67+
68+
- MCP server: <https://github.com/AxT-Team/uapi-mcp>.
69+
- Skills bundle: <https://github.com/AxT-Team/uapi-agent-skills>.
70+
- Other languages: `uapi-sdk-typescript`, `uapi-sdk-python`, `uapi-sdk-go`,
71+
`uapi-sdk-rust`, `uapi-sdk-csharp`, `uapi-sdk-cpp`, `uapi-sdk-php`.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 AxT-Team / UAPI
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,29 @@
88
<maven.compiler.target>17</maven.compiler.target>
99
<maven.compiler.source>17</maven.compiler.source>
1010
</properties>
11+
<name>UAPI SDK for Java</name>
12+
<description>Official Java SDK for UAPI / uapis.cn — typed Java 17+ wrapper around 100+ free public-API endpoints (network, text, image, social, translation, search). Generated from the live OpenAPI 3.1 spec.</description>
13+
<url>https://uapis.cn/docs/sdk/java</url>
14+
<licenses>
15+
<license>
16+
<name>MIT License</name>
17+
<url>https://github.com/AxT-Team/uapi-sdk-java/blob/main/LICENSE</url>
18+
</license>
19+
</licenses>
20+
<developers>
21+
<developer>
22+
<id>uapi</id>
23+
<name>UAPI</name>
24+
<email>dev@uapis.cn</email>
25+
<organization>AxT-Team</organization>
26+
<organizationUrl>https://uapis.cn</organizationUrl>
27+
</developer>
28+
</developers>
29+
<scm>
30+
<connection>scm:git:git://github.com/AxT-Team/uapi-sdk-java.git</connection>
31+
<developerConnection>scm:git:ssh://github.com:AxT-Team/uapi-sdk-java.git</developerConnection>
32+
<url>https://github.com/AxT-Team/uapi-sdk-java/tree/main</url>
33+
</scm>
1134
<dependencies>
1235
<dependency>
1336
<groupId>com.squareup.okhttp3</groupId>

0 commit comments

Comments
 (0)