(pet)
Everything about your Pets
Find out more dfdsiojfidjs http://swagger.io
- petsStoreMonday - Update an existing pet
- myTestPets - Add a new pet to the store
- findPetsByStatusTypes - Finds Pets by status
- findPetsByTags - Finds Pets by tags
- getPetByIDS - Find pet by ID
- deletePet - Deletes a pet
- uploadFile - uploads an image
Update an existing pet by Id
import { Petstore } from "ryan-simple-test-act";
const petstore = new Petstore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await petstore.pet.petsStoreMonday({
id: 10,
name: "doggie",
category: {
id: 1,
name: "Dogs",
},
photoUrls: [
"<value>",
],
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { PetstoreCore } from "ryan-simple-test-act/core.js";
import { petPetsStoreMonday } from "ryan-simple-test-act/funcs/petPetsStoreMonday.js";
// Use `PetstoreCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const petstore = new PetstoreCore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await petPetsStoreMonday(petstore, {
id: 10,
name: "doggie",
category: {
id: 1,
name: "Dogs",
},
photoUrls: [
"<value>",
],
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.Pet | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.Pet>
Error Type | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.ApiErrorNotFound | 404 | application/json |
errors.SDKError | 4XX, 5XX | */* |
Add a new pet to the store
import { Petstore } from "ryan-simple-test-act";
const petstore = new Petstore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await petstore.pet.myTestPets({
id: 10,
name: "doggie",
category: {
id: 1,
name: "Dogs",
},
photoUrls: [
"<value>",
"<value>",
"<value>",
],
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { PetstoreCore } from "ryan-simple-test-act/core.js";
import { petMyTestPets } from "ryan-simple-test-act/funcs/petMyTestPets.js";
// Use `PetstoreCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const petstore = new PetstoreCore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await petMyTestPets(petstore, {
id: 10,
name: "doggie",
category: {
id: 1,
name: "Dogs",
},
photoUrls: [
"<value>",
"<value>",
"<value>",
],
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.Pet | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.Pet>
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |
Multiple status values can be provided with comma separated strings
import { Petstore } from "ryan-simple-test-act";
const petstore = new Petstore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await petstore.pet.findPetsByStatusTypes({});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { PetstoreCore } from "ryan-simple-test-act/core.js";
import { petFindPetsByStatusTypes } from "ryan-simple-test-act/funcs/petFindPetsByStatusTypes.js";
// Use `PetstoreCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const petstore = new PetstoreCore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await petFindPetsByStatusTypes(petstore, {});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FindPetsByStatusTypesRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.Pet[]>
Error Type | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.ApiErrorNotFound | 404 | application/json |
errors.SDKError | 4XX, 5XX | */* |
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
import { Petstore } from "ryan-simple-test-act";
const petstore = new Petstore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await petstore.pet.findPetsByTags({});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { PetstoreCore } from "ryan-simple-test-act/core.js";
import { petFindPetsByTags } from "ryan-simple-test-act/funcs/petFindPetsByTags.js";
// Use `PetstoreCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const petstore = new PetstoreCore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await petFindPetsByTags(petstore, {});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.FindPetsByTagsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.Pet[]>
Error Type | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.ApiErrorNotFound | 404 | application/json |
errors.SDKError | 4XX, 5XX | */* |
Returns a single pet
import { Petstore } from "ryan-simple-test-act";
const petstore = new Petstore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await petstore.pet.getPetByIDS({
petId: 137396,
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { PetstoreCore } from "ryan-simple-test-act/core.js";
import { petGetPetByIDS } from "ryan-simple-test-act/funcs/petGetPetByIDS.js";
// Use `PetstoreCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const petstore = new PetstoreCore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await petGetPetByIDS(petstore, {
petId: 137396,
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetPetByIDSRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.Pet>
Error Type | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.ApiErrorNotFound | 404 | application/json |
errors.SDKError | 4XX, 5XX | */* |
Deletes a pet
import { Petstore } from "ryan-simple-test-act";
const petstore = new Petstore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await petstore.pet.deletePet({
petId: 441876,
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { PetstoreCore } from "ryan-simple-test-act/core.js";
import { petDeletePet } from "ryan-simple-test-act/funcs/petDeletePet.js";
// Use `PetstoreCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const petstore = new PetstoreCore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await petDeletePet(petstore, {
petId: 441876,
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeletePetRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.Pet>
Error Type | Status Code | Content Type |
---|---|---|
errors.ApiErrorInvalidInput | 400 | application/json |
errors.ApiErrorUnauthorized | 401 | application/json |
errors.ApiErrorNotFound | 404 | application/json |
errors.SDKError | 4XX, 5XX | */* |
uploads an image
import { Petstore } from "ryan-simple-test-act";
const petstore = new Petstore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await petstore.pet.uploadFile({
petId: 565380,
});
// Handle the result
console.log(result);
}
run();
The standalone function version of this method:
import { PetstoreCore } from "ryan-simple-test-act/core.js";
import { petUploadFile } from "ryan-simple-test-act/funcs/petUploadFile.js";
// Use `PetstoreCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const petstore = new PetstoreCore({
apiKey: "<YOUR_API_KEY_HERE>",
});
async function run() {
const res = await petUploadFile(petstore, {
petId: 565380,
});
if (!res.ok) {
throw res.error;
}
const { value: result } = res;
// Handle the result
console.log(result);
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.UploadFileRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.ApiResponse>
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |