thunderstore-io / Thunderstore

Thunderstore is a mod database and API for downloading mods. Thunderstore Discord: https://discord.thunderstore.io/
https://thunderstore.io/
GNU Affero General Public License v3.0
138 stars 28 forks source link

Cyberstorm API: return categories and sections for a team #895

Closed anttimaki closed 1 year ago

anttimaki commented 1 year ago

Cyberstorm API: add CyberstormPackageCategorySerializer

It felt a bit dirty to import such a simple serializer from another app, especially since that serializer is marked experimental.

Refs TS-1860

Cyberstorm API: return team's categories and sections

If community is defined, return a list of community's PackageCategories and PackageListingSections too. This is done via optional query parameter so both views that have access to community (e.g. team's package listing view) and don't have it (e.g. team's profile settings view) can use the same endpoint.

Refs TS-1856

anttimaki commented 1 year ago

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

codecov[bot] commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8637060) 92.27% compared to head (e8fe3a9) 92.31%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## cyberstorm-team #895 +/- ## =================================================== + Coverage 92.27% 92.31% +0.03% =================================================== Files 271 272 +1 Lines 7820 7842 +22 Branches 743 745 +2 =================================================== + Hits 7216 7239 +23 + Misses 502 501 -1 Partials 102 102 ``` | [Files](https://app.codecov.io/gh/thunderstore-io/Thunderstore/pull/895?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thunderstore-io) | Coverage Δ | | |---|---|---| | [...understore/api/cyberstorm/serializers/community.py](https://app.codecov.io/gh/thunderstore-io/Thunderstore/pull/895?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thunderstore-io#diff-ZGphbmdvL3RodW5kZXJzdG9yZS9hcGkvY3liZXJzdG9ybS9zZXJpYWxpemVycy9jb21tdW5pdHkucHk=) | `100.00% <100.00%> (ø)` | | | [.../thunderstore/api/cyberstorm/serializers/shared.py](https://app.codecov.io/gh/thunderstore-io/Thunderstore/pull/895?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thunderstore-io#diff-ZGphbmdvL3RodW5kZXJzdG9yZS9hcGkvY3liZXJzdG9ybS9zZXJpYWxpemVycy9zaGFyZWQucHk=) | `100.00% <100.00%> (ø)` | | | [...go/thunderstore/api/cyberstorm/serializers/team.py](https://app.codecov.io/gh/thunderstore-io/Thunderstore/pull/895?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thunderstore-io#diff-ZGphbmdvL3RodW5kZXJzdG9yZS9hcGkvY3liZXJzdG9ybS9zZXJpYWxpemVycy90ZWFtLnB5) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/thunderstore-io/Thunderstore/pull/895/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thunderstore-io)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

anttimaki commented 1 year ago

Closing and reimplementing as a separate endpoint.