Skip to content

Commit d3908ad

Browse files
committed
test(trends): 📝 add docs for trends
1 parent 5c031ec commit d3908ad

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ env.bak/
8888
venv.bak/
8989

9090
# mkdocs documentation
91-
/site
91+
docs/site
9292

9393
# mypy
9494
.mypy_cache/

README.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,18 @@ Now covers these features:
105105
- Blocks
106106
- Mutes
107107

108+
- Usage
109+
- Tweets
110+
111+
- Trends
112+
108113
- Spaces
109114
- Spaces lookup
110115
- Search Spaces
111116

112-
- Compliance
113-
- Batch compliance
117+
- Direct Messages
118+
- Direct Messages lookup
119+
- Manage Direct Messages
114120

115121
- Lists
116122
- List lookup
@@ -120,12 +126,8 @@ Now covers these features:
120126
- List follows
121127
- Pinned Lists
122128

123-
- Direct Messages
124-
- Direct Messages lookup
125-
- Manage Direct Messages
126-
127-
- Usage
128-
- Tweets
129+
- Compliance
130+
- Batch compliance
129131

130132
- Media Upload
131133
- Media Simple upload

docs/docs/usage/trends/trends.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
The Trends lookup endpoint allow developers to get the Trends for a location, specified using the where-on-earth id (WOEID).
2+
3+
**Note:** WOEID is a legacy identifier created by Yahoo and has been deprecated. X API uses the numeric value to identify town and country trend locations.
4+
Reference our legacy [blog post](https://blog.twitter.com/engineering/en_us/a/2010/woeids-in-twitters-trends.html), or [archived data](https://archive.org/details/geoplanet_data_7.10.0.zip0.)
5+
6+
### Get trends
7+
8+
Get the trends for a location
9+
10+
```python
11+
api.get_trends_by_woeid(woeid=1)
12+
# Response(data=[Trend(trend_name='#QuietOnSet', tweet_count=14060), Trend(trend_name='King Charles', tweet_count=42315), Trend(trend_name='Drake Bell', tweet_count=1234)])
13+
```

docs/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ nav:
5656
- Spaces:
5757
- Spaces Lookup: usage/spaces/spaces-lookup.md
5858
- Search Spaces: usage/spaces/search.md
59+
- Trends:
60+
- Trends: usage/trends/trends.md
5961
- Lists:
6062
- List lookup: usage/lists/list-lookup.md
6163
- Manage Lists: usage/lists/manage-lists.md

0 commit comments

Comments
 (0)