@spectratools/xapi-cli 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -67,10 +67,13 @@ xapi-cli users followers jack --new-only --seen-ids-file ./seen-followers.txt --
67
67
  xapi-cli posts get 1234567890 --format json
68
68
  xapi-cli posts like 1234567890 --format json
69
69
  xapi-cli posts unlike 1234567890 --format json
70
+ xapi-cli posts retweet 1234567890 --format json
70
71
  xapi-cli posts bookmark 1234567890 --format json
71
72
  xapi-cli posts unbookmark 1234567890 --format json
72
73
  xapi-cli posts likes 1234567890 --max-results 100 --format json
73
74
  xapi-cli posts retweets 1234567890 --max-results 100 --format json
75
+ xapi-cli users follow interesting_dev --format json
76
+ xapi-cli users unfollow inactive_account --format json
74
77
  xapi-cli users block spammer123 --format json
75
78
  xapi-cli users unblock spammer123 --format json
76
79
  xapi-cli users mute noisyaccount --format json
@@ -80,20 +83,31 @@ xapi-cli users unmute noisyaccount --format json
80
83
  xapi-cli timeline home --max-results 50 --format json
81
84
  xapi-cli timeline mentions --max-results 50 --format json
82
85
 
86
+ # 4b) Timeline polling with --since-id (resume from last-seen post)
87
+ # Store the newest post ID from the previous fetch, then pass it on the next call
88
+ # to retrieve only new posts since that point.
89
+ xapi-cli timeline home --since-id 1900123456789012345 --max-results 50 --format json
90
+ xapi-cli timeline mentions --since-id 1900123456789012345 --max-results 50 --format json
91
+
83
92
  # 5) DM assistant loop
84
93
  xapi-cli dm conversations --max-results 20 --format json
85
94
  xapi-cli dm send 12345 --text "hello from agent" --format json
86
95
 
87
96
  # 6) List curation loop
88
97
  xapi-cli lists create --name "Core devs" --description "Builders only" --private --format json
98
+ xapi-cli lists get 1234567890 --format json
89
99
  xapi-cli lists add-member 1234567890 jack --format json
100
+ xapi-cli lists remove-member 1234567890 jack --format json
90
101
  xapi-cli lists members 1234567890 --max-results 100 --format json
102
+ xapi-cli lists posts 1234567890 --max-results 25 --format json
103
+ xapi-cli lists delete 1234567890 --format json
91
104
  ```
92
105
 
93
106
  ## Notes
94
107
 
95
108
  - All commands support JSON output with `--format json`.
96
- - `users followers --new-only` performs **client-side diffing** against `--seen-ids-file`; it does not use an API-native `since_id` filter for follower deltas.
97
- - Baseline files are read-only input (newline-delimited follower IDs) and are never mutated by the CLI.
109
+ - `timeline home` and `timeline mentions` support `--since-id <post-id>` for incremental polling only posts newer than the given ID are returned. Store the newest ID from each fetch and pass it on the next call to avoid re-processing.
110
+ - `users followers --new-only` performs **client-side diffing** against `--seen-ids-file`; it does not use an API-native `since_id` filter for follower deltas. The baseline file is a newline-delimited list of follower IDs, one per line.
111
+ - Baseline files are read-only input and are never mutated by the CLI. Your application is responsible for updating the baseline after processing new followers.
98
112
  - `X_BEARER_TOKEN` is for read-only app auth.
99
113
  - `X_ACCESS_TOKEN` is required for write actions (`posts create|delete|like|unlike|bookmark|unbookmark|retweet`, `users follow|unfollow|block|unblock|mute|unmute`, `lists create|delete|add-member|remove-member`, `dm send`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectratools/xapi-cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "X (Twitter) API CLI for spectra-the-bot",
5
5
  "type": "module",
6
6
  "license": "MIT",