Skip to content

Commit f5bab06

Browse files
committed
updated retrofit2 play24 sample
1 parent 5c5af90 commit f5bab06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2456
-1041
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.6-SNAPSHOT
1+
3.0.11-SNAPSHOT
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AllPetsResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
# AnimalApi
2+
3+
All URIs are relative to *http://petstore.swagger.io:80/v2*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**addAnimal**](AnimalApi.md#addAnimal) | **POST** animal | Add a new animal to the store
8+
[**deleteAnimal**](AnimalApi.md#deleteAnimal) | **DELETE** animal/{animalId} | Deletes a animal
9+
[**getAnimalById**](AnimalApi.md#getAnimalById) | **GET** animal/{animalId} | Find animal by ID
10+
[**updateAnimal**](AnimalApi.md#updateAnimal) | **PUT** animal | Update an existing animal
11+
[**updateAnimalWithForm**](AnimalApi.md#updateAnimalWithForm) | **POST** animal/{animalId} | Updates a animal
12+
13+
<a name="addAnimal"></a>
14+
# **addAnimal**
15+
> Void addAnimal(body)
16+
17+
Add a new animal to the store
18+
19+
### Example
20+
```java
21+
// Import classes:
22+
//import io.swagger.client.ApiException;
23+
//import io.swagger.client.api.AnimalApi;
24+
25+
26+
AnimalApi apiInstance = new AnimalApi();
27+
Animal body = new Animal(); // Animal | Animal object that needs to be added to the store
28+
try {
29+
Void result = apiInstance.addAnimal(body);
30+
System.out.println(result);
31+
} catch (ApiException e) {
32+
System.err.println("Exception when calling AnimalApi#addAnimal");
33+
e.printStackTrace();
34+
}
35+
```
36+
37+
### Parameters
38+
39+
Name | Type | Description | Notes
40+
------------- | ------------- | ------------- | -------------
41+
**body** | [**Animal**](Animal.md)| Animal object that needs to be added to the store |
42+
43+
### Return type
44+
45+
[**Void**](.md)
46+
47+
### Authorization
48+
49+
No authorization required
50+
51+
### HTTP request headers
52+
53+
- **Content-Type**: application/json, application/xml
54+
- **Accept**: Not defined
55+
56+
<a name="deleteAnimal"></a>
57+
# **deleteAnimal**
58+
> Void deleteAnimal(animalId, apiKey)
59+
60+
Deletes a animal
61+
62+
### Example
63+
```java
64+
// Import classes:
65+
//import io.swagger.client.ApiException;
66+
//import io.swagger.client.api.AnimalApi;
67+
68+
69+
AnimalApi apiInstance = new AnimalApi();
70+
Long animalId = 789L; // Long | Animal id to delete
71+
String apiKey = "apiKey_example"; // String |
72+
try {
73+
Void result = apiInstance.deleteAnimal(animalId, apiKey);
74+
System.out.println(result);
75+
} catch (ApiException e) {
76+
System.err.println("Exception when calling AnimalApi#deleteAnimal");
77+
e.printStackTrace();
78+
}
79+
```
80+
81+
### Parameters
82+
83+
Name | Type | Description | Notes
84+
------------- | ------------- | ------------- | -------------
85+
**animalId** | **Long**| Animal id to delete |
86+
**apiKey** | **String**| | [optional]
87+
88+
### Return type
89+
90+
[**Void**](.md)
91+
92+
### Authorization
93+
94+
No authorization required
95+
96+
### HTTP request headers
97+
98+
- **Content-Type**: Not defined
99+
- **Accept**: Not defined
100+
101+
<a name="getAnimalById"></a>
102+
# **getAnimalById**
103+
> Animal getAnimalById(animalId)
104+
105+
Find animal by ID
106+
107+
Returns a single animal
108+
109+
### Example
110+
```java
111+
// Import classes:
112+
//import io.swagger.client.ApiException;
113+
//import io.swagger.client.api.AnimalApi;
114+
115+
116+
AnimalApi apiInstance = new AnimalApi();
117+
Long animalId = 789L; // Long | ID of pet to return
118+
try {
119+
Animal result = apiInstance.getAnimalById(animalId);
120+
System.out.println(result);
121+
} catch (ApiException e) {
122+
System.err.println("Exception when calling AnimalApi#getAnimalById");
123+
e.printStackTrace();
124+
}
125+
```
126+
127+
### Parameters
128+
129+
Name | Type | Description | Notes
130+
------------- | ------------- | ------------- | -------------
131+
**animalId** | **Long**| ID of pet to return |
132+
133+
### Return type
134+
135+
[**Animal**](Animal.md)
136+
137+
### Authorization
138+
139+
No authorization required
140+
141+
### HTTP request headers
142+
143+
- **Content-Type**: Not defined
144+
- **Accept**: application/xml, application/json
145+
146+
<a name="updateAnimal"></a>
147+
# **updateAnimal**
148+
> Void updateAnimal(body)
149+
150+
Update an existing animal
151+
152+
### Example
153+
```java
154+
// Import classes:
155+
//import io.swagger.client.ApiException;
156+
//import io.swagger.client.api.AnimalApi;
157+
158+
159+
AnimalApi apiInstance = new AnimalApi();
160+
Animal body = new Animal(); // Animal | Animal object that needs to be added.
161+
try {
162+
Void result = apiInstance.updateAnimal(body);
163+
System.out.println(result);
164+
} catch (ApiException e) {
165+
System.err.println("Exception when calling AnimalApi#updateAnimal");
166+
e.printStackTrace();
167+
}
168+
```
169+
170+
### Parameters
171+
172+
Name | Type | Description | Notes
173+
------------- | ------------- | ------------- | -------------
174+
**body** | [**Animal**](Animal.md)| Animal object that needs to be added. |
175+
176+
### Return type
177+
178+
[**Void**](.md)
179+
180+
### Authorization
181+
182+
No authorization required
183+
184+
### HTTP request headers
185+
186+
- **Content-Type**: application/json, application/xml
187+
- **Accept**: Not defined
188+
189+
<a name="updateAnimalWithForm"></a>
190+
# **updateAnimalWithForm**
191+
> Void updateAnimalWithForm(animalId, name, status)
192+
193+
Updates a animal
194+
195+
### Example
196+
```java
197+
// Import classes:
198+
//import io.swagger.client.ApiException;
199+
//import io.swagger.client.api.AnimalApi;
200+
201+
202+
AnimalApi apiInstance = new AnimalApi();
203+
Long animalId = 789L; // Long | ID of animal that needs to be updated
204+
String name = "name_example"; // String |
205+
String status = "status_example"; // String |
206+
try {
207+
Void result = apiInstance.updateAnimalWithForm(animalId, name, status);
208+
System.out.println(result);
209+
} catch (ApiException e) {
210+
System.err.println("Exception when calling AnimalApi#updateAnimalWithForm");
211+
e.printStackTrace();
212+
}
213+
```
214+
215+
### Parameters
216+
217+
Name | Type | Description | Notes
218+
------------- | ------------- | ------------- | -------------
219+
**animalId** | **Long**| ID of animal that needs to be updated |
220+
**name** | **String**| | [optional]
221+
**status** | **String**| | [optional]
222+
223+
### Return type
224+
225+
[**Void**](.md)
226+
227+
### Authorization
228+
229+
No authorization required
230+
231+
### HTTP request headers
232+
233+
- **Content-Type**: application/x-www-form-urlencoded
234+
- **Accept**: Not defined
235+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Body6
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **String** | Updated name of the animal | [optional]
7+
**status** | **String** | Updated status of the animal | [optional]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Body7
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**name** | **String** | Updated name of the dog | [optional]
7+
**status** | **String** | Updated status of the dog | [optional]

0 commit comments

Comments
 (0)