Skip to content

feat(index): index api#104

Merged
trim21 merged 6 commits intobangumi:masterfrom
Sociosarbis:feat-index-draft-pr
Feb 10, 2022
Merged

feat(index): index api#104
trim21 merged 6 commits intobangumi:masterfrom
Sociosarbis:feat-index-draft-pr

Conversation

@Sociosarbis
Copy link
Contributor

@Sociosarbis Sociosarbis commented Jan 24, 2022

获取目录信息

GET /v0/indices/{index_id}

响应:

{
  "id": 15045,
  "title": "日本动画最高收视率TOP100",
  "desc": "[url]http://www.tudou.com/programs/view/W6eIoxnHs6g/[/url]\r\n有美国动画混入,所以准确的说是在日本播放的动画最高收视率(而且是关东地区的\r\n基本大部分是70年代的,那个年代娱乐贫乏优势真大",
  "total": 101,
  "stat": {
    "comments": 8,
    "collects": 96
  },
  "created_at": "2012-11-08T09:23:16+00:00",
  "creator": {
    "username": "14127",
    "nickname": "nickname 14127"
  },
  "ban": false
}

close #

获取目录条目

GET /v0/indices/{index_id}/subjects

request parameters:
type: int
limit: int
offset: int

响应:

{
  "total": 101,
  "limit": 30,
  "offset": 0,
  "data": [{
  "id": 32585,
  "type": 2,
  "name": "",
  "images": null,
  "infobox": null,
  "date": "2022-01-24",
  "comment": "3位 39.4",
  "added_at": "2012-11-08T13: 47: 24+00: 00"
}]
}

close #

@codecov
Copy link

codecov bot commented Jan 24, 2022

Codecov Report

Merging #104 (b7bc4c7) into master (9a85dab) will decrease coverage by 0.1%.
The diff coverage is 95.3%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #104     +/-   ##
========================================
- Coverage    98.2%   98.0%   -0.2%     
========================================
  Files          75      79      +4     
  Lines        3151    3415    +264     
========================================
+ Hits         3095    3348    +253     
- Misses         56      67     +11     
Impacted Files Coverage Δ
tests/fixtures/mock_db_record.py 96.1% <71.4%> (-1.9%) ⬇️
tests/fixtures/mock_service.py 90.3% <72.7%> (-9.7%) ⬇️
pol/api/v0/depends/__init__.py 92.8% <80.0%> (-7.2%) ⬇️
pol/api/v0/models/index.py 94.5% <94.5%> (ø)
tests/app/api_v0/test_index.py 97.6% <97.6%> (ø)
pol/services/index_service.py 98.2% <98.2%> (ø)
pol/api/v0/__init__.py 100.0% <100.0%> (ø)
pol/api/v0/index.py 100.0% <100.0%> (ø)
pol/db/tables.py 98.4% <100.0%> (+0.2%) ⬆️
pol/api/v0/subject.py 93.1% <0.0%> (-3.5%) ⬇️
... and 11 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 9a85dab...b7bc4c7. Read the comment docs.

@trim21
Copy link
Contributor

trim21 commented Jan 24, 2022

评论API先等等吧,社区相关的API都还没决定怎么响应

@trim21 trim21 linked an issue Jan 24, 2022 that may be closed by this pull request
@trim21 trim21 merged commit 422561c into bangumi:master Feb 10, 2022
@Sociosarbis Sociosarbis deleted the feat-index-draft-pr branch March 17, 2022 15:51
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.

[Feature Request]: 目录

2 participants