Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP response model alias for models #1123

Merged
merged 1 commit into from
Aug 21, 2021
Merged

Add HTTP response model alias for models #1123

merged 1 commit into from
Aug 21, 2021

Conversation

zeylahellyer
Copy link
Member

Add a model alias for the Response::models method in Response<ListBody<T>> and Response<MemberListBody> implementations.

This clears up some confusion and allows users to have a form of consistency if they choose to have it.

Add a `model` alias for the `Response::models` method in
`Response<ListBody<T>>` and `Response<MemberListBody>` implementations.

This clears up some confusion and allows users to have a form of
consistency if they choose to have it.

Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
@zeylahellyer zeylahellyer added c-http Affects the http crate t-enhancement labels Aug 20, 2021
@zeylahellyer zeylahellyer merged commit a8dcd45 into twilight-rs:main Aug 21, 2021
@zeylahellyer zeylahellyer deleted the feat/http/response-models-and-model branch August 21, 2021 12:50
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Aug 25, 2021
Add a `model` alias for the `Response::models` method in
`Response<ListBody<T>>` and `Response<MemberListBody>` implementations.

This clears up some confusion and allows users to have a form of
consistency if they choose to have it.

Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
zeylahellyer added a commit that referenced this pull request Aug 30, 2021
Additions

Support message components, including action rows, buttons, and select
menus ([#1020], [#1043], [#1044], [#1090], aggregate
[#1121] - [@AEnterprise], [@AsianIntel], [@zeylahellyer], [@7596ff]).

Add comparing `StatusCode` with `u16` ([#1131] - [@zeylahellyer]).

Add API error code 30040, described as "Maximum number of prune requests
has been reached. Try again later" ([#1125] - [@zeylahellyer]).

Enhancements

Document that `tracing` is now disabled by default
([#1129] - [@zeylahellyer]).

Add `Response<ListBody<T>>::model` and `Response<MemberListBody>::model`
aliases corresponding to their `models` equivalents
([#1123] - [@zeylahellyer]).

Display body parsing errors as a legible string if they're UTF-8 valid
([#1118] - [@AEnterprise]).

[@7596ff]: https://github.com/7596ff
[@AEnterprise]: https://github.com/AEnterprise
[@AsianIntel]: https://github.com/AsianIntel
[@zeylahellyer]: https://github.com/zeylahellyer
[#1131]: #1131
[#1129]: #1129
[#1125]: #1125
[#1123]: #1123
[#1121]: #1121
[#1120]: #1120
[#1118]: #1118
[#1090]: #1090
[#1044]: #1044
[#1043]: #1043
[#1020]: #1020

Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Aug 30, 2021
Additions

Support message components, including action rows, buttons, and select
menus ([twilight-rs#1020], [twilight-rs#1043], [twilight-rs#1044], [twilight-rs#1090], aggregate
[twilight-rs#1121] - [@AEnterprise], [@AsianIntel], [@zeylahellyer], [@7596ff]).

Add comparing `StatusCode` with `u16` ([twilight-rs#1131] - [@zeylahellyer]).

Add API error code 30040, described as "Maximum number of prune requests
has been reached. Try again later" ([twilight-rs#1125] - [@zeylahellyer]).

Enhancements

Document that `tracing` is now disabled by default
([twilight-rs#1129] - [@zeylahellyer]).

Add `Response<ListBody<T>>::model` and `Response<MemberListBody>::model`
aliases corresponding to their `models` equivalents
([twilight-rs#1123] - [@zeylahellyer]).

Display body parsing errors as a legible string if they're UTF-8 valid
([twilight-rs#1118] - [@AEnterprise]).

[@7596ff]: https://github.com/7596ff
[@AEnterprise]: https://github.com/AEnterprise
[@AsianIntel]: https://github.com/AsianIntel
[@zeylahellyer]: https://github.com/zeylahellyer
[twilight-rs#1131]: twilight-rs#1131
[twilight-rs#1129]: twilight-rs#1129
[twilight-rs#1125]: twilight-rs#1125
[twilight-rs#1123]: twilight-rs#1123
[twilight-rs#1121]: twilight-rs#1121
[twilight-rs#1120]: twilight-rs#1120
[twilight-rs#1118]: twilight-rs#1118
[twilight-rs#1090]: twilight-rs#1090
[twilight-rs#1044]: twilight-rs#1044
[twilight-rs#1043]: twilight-rs#1043
[twilight-rs#1020]: twilight-rs#1020

Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
7596ff pushed a commit to 7596ff/twilight that referenced this pull request Aug 30, 2021
Additions

Support message components, including action rows, buttons, and select
menus ([twilight-rs#1020], [twilight-rs#1043], [twilight-rs#1044], [twilight-rs#1090], aggregate
[twilight-rs#1121] - [@AEnterprise], [@AsianIntel], [@zeylahellyer], [@7596ff]).

Add comparing `StatusCode` with `u16` ([twilight-rs#1131] - [@zeylahellyer]).

Add API error code 30040, described as "Maximum number of prune requests
has been reached. Try again later" ([twilight-rs#1125] - [@zeylahellyer]).

Enhancements

Document that `tracing` is now disabled by default
([twilight-rs#1129] - [@zeylahellyer]).

Add `Response<ListBody<T>>::model` and `Response<MemberListBody>::model`
aliases corresponding to their `models` equivalents
([twilight-rs#1123] - [@zeylahellyer]).

Display body parsing errors as a legible string if they're UTF-8 valid
([twilight-rs#1118] - [@AEnterprise]).

[@7596ff]: https://github.com/7596ff
[@AEnterprise]: https://github.com/AEnterprise
[@AsianIntel]: https://github.com/AsianIntel
[@zeylahellyer]: https://github.com/zeylahellyer
[twilight-rs#1131]: twilight-rs#1131
[twilight-rs#1129]: twilight-rs#1129
[twilight-rs#1125]: twilight-rs#1125
[twilight-rs#1123]: twilight-rs#1123
[twilight-rs#1121]: twilight-rs#1121
[twilight-rs#1120]: twilight-rs#1120
[twilight-rs#1118]: twilight-rs#1118
[twilight-rs#1090]: twilight-rs#1090
[twilight-rs#1044]: twilight-rs#1044
[twilight-rs#1043]: twilight-rs#1043
[twilight-rs#1020]: twilight-rs#1020

Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
MaxOhn pushed a commit to MaxOhn/twilight that referenced this pull request Oct 7, 2021
Additions

Support message components, including action rows, buttons, and select
menus ([twilight-rs#1020], [twilight-rs#1043], [twilight-rs#1044], [twilight-rs#1090], aggregate
[twilight-rs#1121] - [@AEnterprise], [@AsianIntel], [@zeylahellyer], [@7596ff]).

Add comparing `StatusCode` with `u16` ([twilight-rs#1131] - [@zeylahellyer]).

Add API error code 30040, described as "Maximum number of prune requests
has been reached. Try again later" ([twilight-rs#1125] - [@zeylahellyer]).

Enhancements

Document that `tracing` is now disabled by default
([twilight-rs#1129] - [@zeylahellyer]).

Add `Response<ListBody<T>>::model` and `Response<MemberListBody>::model`
aliases corresponding to their `models` equivalents
([twilight-rs#1123] - [@zeylahellyer]).

Display body parsing errors as a legible string if they're UTF-8 valid
([twilight-rs#1118] - [@AEnterprise]).

[@7596ff]: https://github.com/7596ff
[@AEnterprise]: https://github.com/AEnterprise
[@AsianIntel]: https://github.com/AsianIntel
[@zeylahellyer]: https://github.com/zeylahellyer
[twilight-rs#1131]: twilight-rs#1131
[twilight-rs#1129]: twilight-rs#1129
[twilight-rs#1125]: twilight-rs#1125
[twilight-rs#1123]: twilight-rs#1123
[twilight-rs#1121]: twilight-rs#1121
[twilight-rs#1120]: twilight-rs#1120
[twilight-rs#1118]: twilight-rs#1118
[twilight-rs#1090]: twilight-rs#1090
[twilight-rs#1044]: twilight-rs#1044
[twilight-rs#1043]: twilight-rs#1043
[twilight-rs#1020]: twilight-rs#1020

Signed-off-by: Zeyla Hellyer <zeyla@hellyer.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-http Affects the http crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants