Skip to content

Commit 0fed0ee

Browse files
author
Vardhan Agnihotri
committed
fixes
1 parent 77fbd7a commit 0fed0ee

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

api/shortcuts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,10 @@ func GetUserPosts(client Client, userID string, maxResults int, opts RequestOpti
206206
}
207207

208208
// GetTimeline fetches the authenticated user's reverse‑chronological timeline.
209+
// Route: GET /2/users/{id}/timelines/reverse_chronological
209210
func GetTimeline(client Client, userID string, maxResults int, opts RequestOptions) (json.RawMessage, error) {
210211
opts.Method = "GET"
211-
opts.Endpoint = fmt.Sprintf("/2/users/%s/reverse_chronological_timeline?max_results=%d&tweet.fields=created_at,public_metrics,conversation_id,entities&expansions=author_id&user.fields=username,name", userID, maxResults)
212+
opts.Endpoint = fmt.Sprintf("/2/users/%s/timelines/reverse_chronological?max_results=%d&tweet.fields=created_at,public_metrics,conversation_id,entities&expansions=author_id&user.fields=username,name", userID, maxResults)
212213
opts.Data = ""
213214

214215
return client.SendRequest(opts)

cli/root.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,15 @@ Shortcut commands (agent‑friendly):
3232
xurl mentions Your mentions
3333
3434
Raw API access (curl‑style):
35-
xurl /2/users/me
36-
xurl -X POST /2/tweets -d '{"text":"Hello world!"}'
37-
xurl --auth oauth2 /2/users/me
35+
basic requests xurl /2/users/me
36+
xurl -X POST /2/tweets -d '{"text":"Hello world!"}'
37+
xurl -H "Content-Type: application/json" /2/tweets
38+
authentication xurl --auth oauth2 /2/users/me
39+
xurl --auth oauth1 /2/users/me
40+
xurl --auth app /2/users/me
41+
media and streaming xurl media upload path/to/video.mp4
42+
xurl /2/tweets/search/stream --auth app
43+
xurl -s /2/users/me
3844
3945
Run 'xurl --help' to see all available commands.`,
4046
Args: func(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)