-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(net): evento api #26
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
…interface requirements of the URL library to resolve the compilation error.
clang-tidy review says "All clean, LGTM! 👍" |
… the return type from void to bool for some function
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
查询活动接口的返回数据类型有变动,注意同步变更
…o make the overall behavior more in line with server interface expectations
…align with the new backend interface specifications
clang-tidy review says "All clean, LGTM! 👍" |
… passing arguments by reference. Additionally, renamed some incorrectly named variables in EventEntity to conform to backend interface specifications.
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
…iables and functions.
clang-tidy review says "All clean, LGTM! 👍" |
改完之后就可以把 PR 打开,准备合入 |
Additionally changed the definition locations of some variables and optimized the parameter names of some functions.
clang-tidy review says "All clean, LGTM! 👍" |
…t` in getUserFeedback
clang-tidy review says "All clean, LGTM! 👍" |
* feat:Preliminarily completed the implementation of the evento api interface * fix(net): Use `std::string` for all non-string arguments to meet the interface requirements of the URL library to resolve the compilation error. * fix(net)!: fix the false return type of refreshAccessToken and change the return type from void to bool for some function * fix(net): Fixed incorrect behavior in refreshAccessToken function. * refactor(net): Modified the return value settings of some functions to make the overall behavior more in line with server interface expectations * feat(net)!: Modified some function interfaces and implementations to align with the new backend interface specifications * feat(net): Implemented department-related functions. * fix(net): fix JSON parsing problem * feat(net)!: Changed the return value types of some functions to avoid passing arguments by reference. Additionally, renamed some incorrectly named variables in EventEntity to conform to backend interface specifications. * style(net): Modified code style to meet requirements. * feat(net): Add getEventList function * feat(net)!: Deprecated some functions and change the name of some variables and functions. * feat(net)!: Primarily enhanced the security of certain functions. Additionally changed the definition locations of some variables and optimized the parameter names of some functions. * feat(net): Initialize `std::optional<FeedbackEntity>` as `std::nullopt` in getUserFeedback
* feat:Preliminarily completed the implementation of the evento api interface * fix(net): Use `std::string` for all non-string arguments to meet the interface requirements of the URL library to resolve the compilation error. * fix(net)!: fix the false return type of refreshAccessToken and change the return type from void to bool for some function * fix(net): Fixed incorrect behavior in refreshAccessToken function. * refactor(net): Modified the return value settings of some functions to make the overall behavior more in line with server interface expectations * feat(net)!: Modified some function interfaces and implementations to align with the new backend interface specifications * feat(net): Implemented department-related functions. * fix(net): fix JSON parsing problem * feat(net)!: Changed the return value types of some functions to avoid passing arguments by reference. Additionally, renamed some incorrectly named variables in EventEntity to conform to backend interface specifications. * style(net): Modified code style to meet requirements. * feat(net): Add getEventList function * feat(net)!: Deprecated some functions and change the name of some variables and functions. * feat(net)!: Primarily enhanced the security of certain functions. Additionally changed the definition locations of some variables and optimized the parameter names of some functions. * feat(net): Initialize `std::optional<FeedbackEntity>` as `std::nullopt` in getUserFeedback
* feat(ui): complete main layout, add carousel. * feat(ui): add layout to "current activity" * feat(executor): different modes of `asyncExecute` using a timer One more parameter of `asyncExecute` when using a timer: TimerFlag flag TimerFlag::Once: perform the operation only once TimerFlag::Periodic: perform the operation periodically Implementation of `asyncExecuteByTimer` optimized `io_context` exposed for more flexibility * feat(executor): add execution strategy * feat: add view data to `ViewManager` (#17) * fix: added assert to `UiBridge::call` * refactor: added included header in `BasicView` for convenience * feat: added view data to `ViewManager` * feat(net): github api (#28) * feat:completed github api interface * style:Change code style to match clang-format --------- Co-authored-by: Serein <[email protected]> * docs(executor): optimize flag description * feat(net): evento api (#26) * feat:Preliminarily completed the implementation of the evento api interface * fix(net): Use `std::string` for all non-string arguments to meet the interface requirements of the URL library to resolve the compilation error. * fix(net)!: fix the false return type of refreshAccessToken and change the return type from void to bool for some function * fix(net): Fixed incorrect behavior in refreshAccessToken function. * refactor(net): Modified the return value settings of some functions to make the overall behavior more in line with server interface expectations * feat(net)!: Modified some function interfaces and implementations to align with the new backend interface specifications * feat(net): Implemented department-related functions. * fix(net): fix JSON parsing problem * feat(net)!: Changed the return value types of some functions to avoid passing arguments by reference. Additionally, renamed some incorrectly named variables in EventEntity to conform to backend interface specifications. * style(net): Modified code style to meet requirements. * feat(net): Add getEventList function * feat(net)!: Deprecated some functions and change the name of some variables and functions. * feat(net)!: Primarily enhanced the security of certain functions. Additionally changed the definition locations of some variables and optimized the parameter names of some functions. * feat(net): Initialize `std::optional<FeedbackEntity>` as `std::nullopt` in getUserFeedback * feat(ui): add scrollview to layout * feat/ui/discovery-page: add scarousel to scroollview * feat/ui/DiscoveryPage: accomplish dynamic grid using double for loop in VerticalLayout, but font not set yet * feat(ui): ui core multiple update (#31) * feat(ui): added state layer * feat(ui): modify overlay, improve menu and login * feat(ui): improve `MessageManager` * feat(ui): added developer shortcut to skip `LoginOverlay` Press Ctrl + Shift + Right click on shadow of `LoginOverlay` to skip login * feat: set default slint style to material * fix(ui): fix toast and login shadow (#33) * fix(ui): make login shadow opaque * fix(ui): make toast higher than overlay * feat: slint experimental feature * feat(ui): initialize sur-ui default theme * fix: crash showing message when another message on screen * feat(ui): optimize menu overlay * fix: open url failed on macos * build(deps): bump 3rdpart/sast-link-cxx-sdk from `9e2e743` to `2f62634` (#34) Bumps [3rdpart/sast-link-cxx-sdk](https://github.com/Serein207/sast-link-cxx-sdk) from `9e2e743` to `2f62634`. - [Release notes](https://github.com/Serein207/sast-link-cxx-sdk/releases) - [Commits](Serein207/sast-link-cxx-sdk@9e2e743...2f62634) --- updated-dependencies: - dependency-name: 3rdpart/sast-link-cxx-sdk dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: make `openBrowser` inline, added dev shortcut Ctrl+Shift+Left click for skip login Ctrl+Shift+Right click for fake login (not trigger onLogin) * fix: menu expand animation lost * chore(cmake): remove useless variable * build(deps): bump 3rdpart/sast-link-cxx-sdk from `9e2e743` to `2f62634` (#35) Bumps [3rdpart/sast-link-cxx-sdk](https://github.com/Serein207/sast-link-cxx-sdk) from `9e2e743` to `2f62634`. - [Release notes](https://github.com/Serein207/sast-link-cxx-sdk/releases) - [Commits](Serein207/sast-link-cxx-sdk@9e2e743...2f62634) --- updated-dependencies: - dependency-name: 3rdpart/sast-link-cxx-sdk dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Serein <[email protected]> * feat(ui): finish setting page (#21) * feat:some basic laying * feat(ui): basic laying on the page * ui laying primary draft * feat(ui): callbacks and root * attempt to fill in .cc and .slint * callbacks fiied * feat: setting page * feat: change theme when app start * chore: clean up code * feat(ui): add scroll view in setting page --------- Co-authored-by: Serein <[email protected]> * feat(ui): `LoadingButton` component (#37) * feat: basic `LoadingButton` * feat: add custom animate * feat: export component in index, clean up code * refactor!: drop icon color auto switch function (#42) * refactor!: drop icon color auto switch * fix: correct existing `Image` reasons: - reduce resource file number and executable size when embed resource - color not exactly match environment (not the same color of text) - auto switch require duplicate files with little difference, and not fit into some special requirements perfectly - colorize support animation How to migrate: ``` Image { source: Token.image.icon.me; colorize: Token.color.on-surface; // should be added to all Image with source Token.image.icon.* } ``` Following icon keep previous behavior. - evento (bad support for `colorize`) BREAKING CHANGE: remove support for icon color auto-switch, please use `colorize` property of `Image` instead. * feat(ui): event card (#38) feat(ui): `Card`, `EventCard` , `EventCardGroup` and coversion function in `Convert.hh` * feat(ui): improve view data logic use std::array instead for convenience * feat(assets): remove useless images * feat(card): optimize animation * feat(card): optimize event card * feat(font): increase font size * feat(ui)!: add md3 button (#46) * feat(ui): added scrim, shadow color and elevation * feat(ui): improve menu shadow * feat(ui): improve state layer * feat(ui): improve `LoadingAnimation` * feat(ui): added md3 button BREAKING CHANGE: 目前 LoadingButton 已被删除,请使用 LoadingAnimation 和 Button 的组合 * feat(ui): complete main layout, add carousel. * feat(ui): add scrollview to layout * feat/ui/DiscoveryPage: accomplish dynamic grid using double for loop in VerticalLayout, but font not set yet * feat/ui/discovery-page: use component eventcardgroup * feat/ui/discovery-page: pull before push to remote * feat(ui): fix compile error and conflicts * feat/ui/discovery-page: modify component height * feat/ui/discovery-page: finish page display * feat/ui/discovery-page: seperate current and newest event * feat/ui/discovery-page: delete dead code * fix: correct about page link color * refactor: new login overlay * docs(readme): change to english * feat(cache): clear disk cache * fix(net)!: potential lifetime problem & modify api * perf(net): change buffer to local variable * fix(ui): load image logic * feat(ui): clean up code * fix * ci: limit thread number of build * build: replace platform macro * fix: remove redundant code due to merge * feat: controller logic * fix: miss header * perf: condition render info text --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Mairon <[email protected]> Co-authored-by: Serein <[email protected]> Co-authored-by: cEvolve05 <[email protected]> Co-authored-by: shuzhuxvchuang <[email protected]> Co-authored-by: Serein <[email protected]> Co-authored-by: ZhiweiCOfficial <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: DTPA101 <[email protected]> Co-authored-by: Mairon <[email protected]>
网络层 Evento 相关 API 更新日志和注意事项
版本:8.17
注意: 本文档仅对部分难以理解的参数进行解释,其余参数可以语义化理解。如有其他事项或疑问,请在开发者群中询问或直接私聊。
非兼容性改动
void
改为bool
。bool
值仅代表服务器成功收到请求并处理,bool
值表示服务器处理后的最终结果,需要根据结果判断整个操作是否成功。EventEntityList
改为EventQueryRes
,类型描述见下方或相关文件。FeedbackEntity
改为std::optional<FeedbackEntity>
。data
字段为空)时,std::optional<FeedbackEntity>
值为std::nullopt
,请注意相关判别和逻辑处理。新增接口
Task<Result<DepartmentInfoEntityList>> getDepartmentInfo();
Department
获取指定部门的相关活动。std::string const& larkDepartment
,int page
,int size
。getDepartmentInfo
函数中返回的对应值。Task<Result<EventQueryRes>> getEventList(std::initializer_list<urls::param> params);
params
请求事件列表。std::initializer_list<urls::param> params
。params
,具体详见示例。使用示例:
新增类型
EventQueryRes
类型定义:elements
字段代表事件列表。current
和total
字段代表服务器返回的相应值。DepartmentInfoEntityList
类型定义:std::string
。类型变更
EventEntity
中isChecked
变更为isCheckedIn
以满足后端接口规范。