-
Notifications
You must be signed in to change notification settings - Fork 1
/
JokesAPI.xml
259 lines (257 loc) · 12.6 KB
/
JokesAPI.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<?xml version="1.0"?>
<doc>
<assembly>
<name>JokesAPI</name>
</assembly>
<members>
<member name="M:JokesAPI.Controllers.JokesController.GetAllJokesAsync">
<summary>
GetAllJokesAsync returns all jokes in the database.
</summary>
<remarks>This returns all jokes. This is fine while the database is small.
Consider using PageJokes as the data grow to maximize client responsiveness for the user</remarks>
<returns>A list of Jokes</returns>
</member>
<member name="M:JokesAPI.Controllers.JokesController.GetJokeItem(System.Nullable{System.Int64})">
<summary>
GetJokeItem returns a specific joke associated with the supplied id
</summary>
<param name="id">Id of a joke in the Jokes database</param>
<returns>StatusCodes.Status200OK if the joke is found, NotFound if the Joke does not exist, BadRequest on exception</returns>
</member>
<member name="M:JokesAPI.Controllers.JokesController.PutJokeItem(System.Nullable{System.Int64},JokesAPI.Models.JokeItem)">
<summary>
PutJokeItem allows the client to modify an existing Joke
</summary>
<remarks>This API is restricted. Users must be authenticated via the Login API
Status != Success returns a standard ApiError object
{
"statusCode": 404,
"statusDescription": "NotFound",
"message": "No Joke found with Id = 123"
}
</remarks>
<param name="id">Id of the joke in the Jokes table</param>
<param name="jokeItem">A JokeItem object</param>
<response code="200">Success: Joke successfully updated</response>
<response code="404">NotFound: Unabled to modify the Joke due to validation error</response>
<response code="400">BadRequest: Exception occured inside the API method</response>
<returns>StatusCodes.Status200OK (success), BadRequest (bad data or exception), or NotFound (if the Id does not exist)</returns>
</member>
<member name="M:JokesAPI.Controllers.JokesController.PostJokeItem(JokesAPI.Models.JokeItem)">
<summary>
PostJokeItem allows the user to add jokes to the Jokes Database
</summary>
<remarks>This API is restricted. Users must be authenticated via the Login API</remarks>
<param name="jokeItem">JSON Representing a JokeItem Model</param>
<returns>Success = StatusCodes.Status200OK or BadRequest if unsuccessful</returns>
</member>
<member name="M:JokesAPI.Controllers.JokesController.DeleteJokeItem(System.Nullable{System.Int64})">
<summary>
DeleteJokeItem provides the ability to delete a joke from the datbase.
</summary>
<param name="id">Id of the Joke in the Jokes table</param>
<remarks>This API is restricted. Users must be authenticated via the Login API</remarks>
<returns>If successfully deleted this method returns StatusCodes.Status200OK.
Otherwise it returns a BadRequest status code.</returns>
</member>
<member name="M:JokesAPI.Controllers.JokesController.PagingJoke(System.Nullable{System.Int32},System.Nullable{System.Int32})">
<summary>
PagingJoke provides a mechanism for paging through the span of jokes.
</summary>
<param name="pageNumber">Defines wich page number as the start</param>
<param name="pageSize">Defines how many items appear on a page</param>
<returns>A specified number of jokes on the requested page</returns>
</member>
<member name="M:JokesAPI.Controllers.JokesController.SearchJokes(System.String)">
<summary>
SearchJokes provides the ability to search for jokes that 'contain' the search text.
Future Plans: Extend this to look for 'StartsWith', 'Contains', or 'EndsWidth'.
</summary>
<param name="text">The text you are searching for in the jokes database.</param>
<returns>Any joke that 'Contains" the search text value</returns>
</member>
<member name="M:JokesAPI.Controllers.JokesController.Random">
<summary>
The Random API returns a random joke from the Jokes Database.
</summary>
<returns>A single joke from the jokes database</returns>
</member>
<member name="M:JokesAPI.Controllers.LoginController.Login(System.String,System.String)">
<summary>
Logs the user in and returns a JWT Java Web Token
</summary>
<param name="username">name of an existing user</param>
<param name="password"></param>
<returns>JWT Web Token if the user exists</returns>
</member>
<member name="M:JokesAPI.Controllers.LoginController.GenerateJSONWebToken(JokesAPI.Models.UserAuth)">
<summary>
Generates the JWT for a given UserAuth object
</summary>
<param name="user">A UserAuth object used to generate the JWT</param>
<returns>A JWT Security Token</returns>
</member>
<member name="M:JokesAPI.Controllers.LoginController.AuthenticateUser(JokesAPI.Models.UserAuth)">
<summary>
Authenticates the user
</summary>
<param name="login">A UserAuth object containing the UserName and Password</param>
<returns>UserAuth object</returns>
</member>
<member name="M:JokesAPI.Controllers.LoginController.Post">
<summary>
Welcome the new login...just here for testing
</summary>
<returns></returns>
</member>
<member name="M:JokesAPI.Controllers.UserInfoController.GetUsers">
<summary>
Gets all users and their non-proteced information
</summary>
<returns>A list of all users in the system</returns>
</member>
<member name="M:JokesAPI.Controllers.UserInfoController.GetUsersSecure">
<summary>
Returns all users including protected data such as passwords.
Must be logged in and provide a JSON Web Token
</summary>
<returns>List of UserInfo objects</returns>
</member>
<member name="M:JokesAPI.Controllers.UserInfoController.GetUserInfo(System.Int64)">
<summary>
Gets a specific user by Id. Does not return protected information such as Password
</summary>
<param name="id">Id of an exising user</param>
<returns>UserInfoDTO</returns>
</member>
<member name="M:JokesAPI.Controllers.UserInfoController.PutUserInfo(System.Int64,JokesAPI.Models.UserInfo)">
<summary>
Updates the specified user
</summary>
<param name="id">Id of the user to update</param>
<param name="userInfo">UserInfo Model</param>
<returns>Ok if successful</returns>
</member>
<member name="M:JokesAPI.Controllers.UserInfoController.PostUserInfo(JokesAPI.Models.UserInfo)">
<summary>
Creates a new user
</summary>
<param name="userInfo">UserInfo Model</param>
<returns>The new user's information if successful</returns>
</member>
<member name="M:JokesAPI.Controllers.UserInfoController.DeleteUserInfo(System.Int64)">
<summary>
Deletes the specified user
</summary>
<param name="id">Id of the user to delete</param>
<returns>That user's info if successful</returns>
</member>
<member name="T:JokesAPI.Data.Interfaces.IRepository`1">
<summary>
Use as the base repository interface for each Model's Repository Interface.
</summary>
<typeparam name="TEntity"></typeparam>
</member>
<member name="M:JokesAPI.Data.Interfaces.IRepository`1.GetItemAsync(System.Int64)">
<summary>
Get a single item from the repository by Id
</summary>
<param name="id">Id of the item in the repository/table</param>
<returns>TEntity</returns>
</member>
<member name="M:JokesAPI.Data.Interfaces.IRepository`1.GetAllAsync">
<summary>
Asynchronously Get all items in the respository for the given type TEntity
</summary>
<returns>IEnumerable of TEntity</returns>
</member>
<member name="M:JokesAPI.Data.Interfaces.IRepository`1.Find(System.Linq.Expressions.Expression{System.Func{`0,System.Boolean}})">
<summary>
Find an item in the repository
</summary>
<param name="predicate"></param>
<returns></returns>
</member>
<member name="M:JokesAPI.Data.Repositories.Repository`1.GetAll">
<summary>
Temporary non-async version to test Mock
</summary>
<returns></returns>
</member>
<member name="P:JokesAPI.Data.Repositories.Repository`1.Count">
<summary>
Returns the count of items held by the TEntity object
</summary>
</member>
<member name="M:JokesAPI.Data.Repositories.Repository`1.Add(`0)">
<summary>
NOTE: I do not advocate using Tuple as a return type.
I would prefer to use a Class
</summary>
<param name="entity"></param>
<returns></returns>
</member>
<member name="M:JokesAPI.Data.Repositories.Repository`1.AddRange(System.Collections.Generic.IEnumerable{`0})">
<summary>
Adds a Range of TEntity. Mostly used for UnitTesting.
</summary>
<param name="entities">IEnumerable of TEntity</param>
</member>
<member name="M:JokesAPI.Data.Repositories.Repository`1.Remove(`0)">
<summary>
Removes an item from the Repository
</summary>
<param name="entity">TEntity</param>
</member>
<member name="M:JokesAPI.Data.Repositories.Repository`1.RemoveRange(System.Collections.Generic.IEnumerable{`0})">
<summary>
Removes a range of items from the Repository
</summary>
<param name="entities"></param>
</member>
<member name="M:JokesAPI.Data.Repositories.Repository`1.SetState(`0,Microsoft.EntityFrameworkCore.EntityState)">
<summary>
Set the State of the Entity (Modified, Saved, Deleted, etc)
</summary>
<param name="item">TEntity</param>
<param name="state">EntityState</param>
</member>
<member name="T:JokesAPI.Data.Repositories.RepositoryStatus">
<summary>
There are some cases where there are multiple failure modes.
This class provides a standard return package indicating success/error and a message.
</summary>
</member>
<member name="P:JokesAPI.Data.Repositories.RepositoryStatus.Success">
<summary>
Returns True if successful. False if not successful.
</summary>
</member>
<member name="P:JokesAPI.Data.Repositories.RepositoryStatus.Message">
<summary>
Holds the message if applicable.
Mostly used to hold the error message
</summary>
</member>
<member name="M:JokesAPI.Data.UnitOfWorkEntity`1.SetState(`0,Microsoft.EntityFrameworkCore.EntityState)">
<summary>
Set the State of the Entity (Modified, Saved, Deleted, etc)
</summary>
<param name="item">TEntity</param>
<param name="state">EntityState</param>
</member>
<member name="M:JokesAPI.Middleware.AppDbContextExtensions.EnsureDatabaseIsSeeded(Microsoft.AspNetCore.Builder.IApplicationBuilder)">
<summary>
Performs Migration and then seeds the Database with test data if none exists.
</summary>
<param name="app">IApplicationBuilder</param>
</member>
<member name="M:JokesAPI.Middleware.AppDbContextExtensions.EnsureDatabaseIsSeeded(JokesAPI.Models.AppDbContext)">
<summary>
If there are no jokes then this method will seed the database with defaeult joke data.
</summary>
<param name="context">JokesAPI.Models.AppDbContext</param>
</member>
</members>
</doc>