Add get_trending_hashtags to discovery mixin #10
Labels
No labels
bug
contribution welcome
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
marvin8/longwei#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The discovery mixin implements three of the four
GET /api/v1/trends/*endpoints (statuses, accounts, links) but is missing the hashtag variant:GET /api/v1/trends/tags.Findings
_mixin_discovery.pyhasget_trending_statuses,get_trending_accounts,get_trending_links— all identical in structure (limit/offsetparams, same logging pattern).Tagmodel already exists inmodels.py(lines 123-133) withname,url, andextra="allow"— thehistoryarray from the API response will be captured transparently.Tagis not currently in__all__— needs to be added so callers can type-annotate.Plan of attack
tests/test_mixin_discovery.py(TAG_FIXTURE + 3 tests: happy path, params, network error).get_trending_hashtagsto_mixin_discovery.pyhittingGET /api/v1/trends/tags, returninglist[Tag].Tagfrom__init__.py__all__.