Skip to content

Conversation

@trim21
Copy link
Contributor

@trim21 trim21 commented Jan 9, 2022

获取用户收藏

GET /v0/user/{username}/collections

Request Header:

可以携带 Access Token ,无 token 的情况下不返回 private 收藏。

Request Query:

  • username required

分页参数

  • limit = 30
  • offset

响应:

按照用户最后更新时间排序

{
  "total": 5,
  "limit": 30,
  "offset": 0,
  "data": [
    {
      "subject_id": 8,
      "subject_type": 2,
      "rate": 0,
      "type": 2,
      "comment": "test comment",
      "tags": ["SUNRISE"],
      "ep_status": 23,
      "vol_status": 0,
      "updated_at": "2021-12-15T11:56:11+00:00",
      "private": false
    },
    {
      "subject_id": 9,
      "subject_type": 2,
      "rate": 0,
      "type": 2,
      "comment": null,
      "tags": [],
      "ep_status": 23,
      "vol_status": 0,
      "updated_at": "2021-12-15T11:56:11+00:00",
      "private": false
    },
    ...
  ]
}

@trim21 trim21 changed the title Feat/user/collection feat(user): usercollection Jan 9, 2022
@trim21 trim21 changed the title feat(user): usercollection feat(user): user collection Jan 9, 2022
@trim21 trim21 changed the title feat(user): user collection feat(user): user subject collection Jan 9, 2022
@trim21 trim21 marked this pull request as draft January 9, 2022 08:19
@codecov
Copy link

codecov bot commented Jan 9, 2022

Codecov Report

Merging #83 (6775936) into master (c0698a2) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #83     +/-   ##
========================================
+ Coverage    98.5%   98.6%   +0.1%     
========================================
  Files          56      61      +5     
  Lines        2370    2521    +151     
========================================
+ Hits         2336    2488    +152     
+ Misses         34      33      -1     
Impacted Files Coverage Δ
pol/api/v0/__init__.py 100.0% <100.0%> (ø)
pol/api/v0/depends/__init__.py 100.0% <100.0%> (ø)
pol/api/v0/depends/auth/__init__.py 100.0% <100.0%> (ø)
pol/api/v0/me.py 100.0% <100.0%> (ø)
pol/api/v0/user/__init__.py 100.0% <100.0%> (ø)
pol/api/v0/user/collection.py 100.0% <100.0%> (ø)
pol/curd/__init__.py 100.0% <100.0%> (ø)
pol/db/const.py 92.1% <100.0%> (+0.4%) ⬆️
pol/db/tables.py 98.8% <100.0%> (+0.3%) ⬆️
pol/models/__init__.py 100.0% <100.0%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0698a2...6775936. Read the comment docs.

@trim21 trim21 marked this pull request as ready for review January 9, 2022 09:40
@trim21 trim21 mentioned this pull request Jan 9, 2022
47 tasks
@trim21 trim21 merged commit c60cdf4 into bangumi:master Jan 9, 2022
@trim21 trim21 deleted the feat/user/collection branch January 9, 2022 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant