Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/speakeasy-sdks/pet
A java SDK for accessing the api-name-pet API.
https://github.com/speakeasy-sdks/pet
Last synced: 2 days ago
JSON representation
A java SDK for accessing the api-name-pet API.
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/pet
- Owner: speakeasy-sdks
- License: mit
- Created: 2023-09-14T08:59:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:45:39.000Z (7 months ago)
- Last Synced: 2024-04-28T05:14:49.448Z (6 months ago)
- Language: Java
- Size: 123 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# api-name-pet
## SDK Installation
### Gradle
```groovy
implementation 'com.testworkspace2.pet.api_name_pet:api-name-pet:0.11.0'
```## SDK Example Usage
### Example
```java
package hello.world;import com.testworkspace2.pet.api_name_pet.ApiNamePet;
import com.testworkspace2.pet.api_name_pet.models.operations.CreatePetsResponse;
import com.testworkspace2.pet.api_name_pet.models.shared.Pet;public class Application {
public static void main(String[] args) {
try {
ApiNamePet sdk = ApiNamePet.builder() .build();com.testworkspace2.pet.api_name_pet.models.shared.Pet req = new Pet(
596804L,
""){{
tag = "";}};
com.testworkspace2.pet.api_name_pet.models.operations.CreatePetsResponse res = sdk.pets.createPets(req);
if (res.statusCode == 200) {
// handle response
}
} catch (Exception e) {
// handle exception
}
}
}
```## Available Resources and Operations
### [pets](docs/sdks/pets/README.md)
* [createPets](docs/sdks/pets/README.md#createpets) - Create a pet
* [listPets](docs/sdks/pets/README.md#listpets) - List all pets
* [showPetById](docs/sdks/pets/README.md#showpetbyid) - Info for a specific pet## Server Selection
## Server Selection
### Select Server by Index
You can override the default server globally using the `setServerIndex` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
| # | Server | Variables |
| - | ------ | --------- |
| 0 | `http://petstore.swagger.io/v1` | None |### Override Server URL Per-Client
The default server can also be overridden globally using the `setServerURL` option when initializing the SDK client instance. For example:
### Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
looking for the latest version.### Contributions
While we value open-source contributions to this SDK, this library is generated programmatically.
Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)