Skip to content

Commit 6e75792

Browse files
committed
fix bwoken winks
1 parent 5a823e7 commit 6e75792

File tree

9 files changed

+21
-31
lines changed

9 files changed

+21
-31
lines changed

changelog.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,11 @@ On August 12th, 2020, we launched the new X API v2: Early access. With this rele
518518

519519
Today marks 60 days since the launch, meaning that we have retired the following endpoints. If you are using the Labs versions of these endpoints, you can use the linked migration guides to update your integration to start using the new X API v2 versions:
520520

521-
* [post metrics v1](https://developer.x.com/en/docs/labs/migrate)
521+
* post metrics v1
522522

523-
* [Filtered stream v1](/x-api/posts/filtered-stream#comparing-x-apis-filtered-stream-endpoints)
523+
* Filtered stream v1
524524

525-
* [Sampled stream v1](https://developer.x.com/en/docs/x-api/posts/sampled-stream/migrate)
525+
* Sampled stream v1
526526

527527
We also have additional details about migration to the new X API v2 via our [migration hub](/x-api/migrate/overview).
528528

x-api/posts/counts/integrate/build-a-query.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Characters with accents or diacritics are treated the same as normal characters
9393

9494
All operators are evaluated in a case-insensitive manner. For example, the query cat will match Posts with all of the following: _cat__CAT__Cat_.
9595

96-
The [filtered stream](/x-api/posts/filtered-stream) matching behavior acts differently from Post counts. When [building a filtered stream rule](/x-api/posts/filtered-stream#building-rules-for-filtered-stream), know that keywords and hashtags that include accents and diacritics will only match on terms that also include the accent and diacritic, and will not match on terms that use normal characters instead. 
96+
The [filtered stream](/x-api/posts/filtered-stream) matching behavior acts differently from Post counts. When [building a filtered stream rule](/x-api/posts/filtered-stream/integrate/build-a-rule), know that keywords and hashtags that include accents and diacritics will only match on terms that also include the accent and diacritic, and will not match on terms that use normal characters instead. 
9797

9898
For example, filtered stream rules that include a keyword Diacrítica or hashtag #cumpleaños will only match the terms _Diacrítica_ and _#cumpleaños_, and will not match on _Diacritica_ or _#cumpleanos_ without the tilde í or eñe
9999

x-api/posts/filtered-stream/integrate/build-a-rule.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords: ["build rule", "filter rules", "stream rules", "rule builder", "filter
77

88
The filtered stream endpoints deliver Posts that match a set of rules applied to the stream. Rules are made up of operators that match on a variety of Post attributes.
99

10-
Multiple rules can be applied using the [POST /tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) endpoint. Once you've added rules and connected using [GET /tweets/search/stream](/x-api/posts/filtered-stream#get-2-tweets-search-stream), only Posts matching your rules will be delivered. You do not need to disconnect to add or remove rules.
10+
Multiple rules can be applied using the [POST /tweets/search/stream/rules](/x-api/stream/update-stream-rules) endpoint. Once you've added rules and connected using [GET /tweets/search/stream](/x-api/stream/get-stream-rules), only Posts matching your rules will be delivered. You do not need to disconnect to add or remove rules.
1111

1212
---
1313

@@ -188,7 +188,7 @@ Holiday Posts are appearing. Exclude them:
188188

189189
## Adding and removing rules
190190

191-
Use [POST /2/tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) to add or remove rules.
191+
Use [POST /2/tweets/search/stream/rules](/x-api/stream/update-stream-rules) to add or remove rules.
192192

193193
### Adding rules
194194

x-api/posts/filtered-stream/integrate/matching-returned-tweets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The filtered stream endpoint gives you the ability to have multiple rules in pla
1010

1111
When you specify your rules to match Posts based on a wide variety of attributes, including user attributes, geo-location, language, and many others, you can attach a tag to distinguish this rule at a higher level. Tags are a good way to contextualize your rule, especially if you have many rules in place. The filtering rules determine which Post activities will be sent through the connection.
1212

13-
If you need to add a new filtering rule to capture a different type of Post, or remove an existing rule, your app can send a request to the [POST tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) endpoint to make it happen. When that request is sent, the filtering rules are automatically modified and the changes simply take effect in the data stream with no need to reconnect. Most rule additions take effect  about 20 seconds or less. It’s unlikely, but depending on external factors (for example, network connectivity), it may take longer before you start receiving matching Posts. If you can’t find a rule in the list rule endpoint, make sure that the rule creation request succeeded; this can be done by checking your logs for any error messages.
13+
If you need to add a new filtering rule to capture a different type of Post, or remove an existing rule, your app can send a request to the [POST tweets/search/stream/rules](/x-api/stream/update-stream-rules) endpoint to make it happen. When that request is sent, the filtering rules are automatically modified and the changes simply take effect in the data stream with no need to reconnect. Most rule additions take effect  about 20 seconds or less. It’s unlikely, but depending on external factors (for example, network connectivity), it may take longer before you start receiving matching Posts. If you can’t find a rule in the list rule endpoint, make sure that the rule creation request succeeded; this can be done by checking your logs for any error messages.
1414

1515

1616
#### Matching rules

x-api/posts/filtered-stream/migrate/overview.mdx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,15 @@ The following table compares the filtered streaming endpoints X offers:
2525
| Endpoint path | ******1.1/statuses/filter.json****** | ******/stream/powertrack/accounts/{gnip_account_name}/publishers/twitter/{stream_label}.json******<br/><br/>******/rules/powertrack/accounts/{gnip_account_name}/publishers/twitter/{stream_label}.json ******<br/><br/>******/rules/powertrack/accounts/{gnip_account_name}/publishers/twitter/{stream_label}/validation.json****** | ******/2/tweets/search/stream******<br/><br/>******/2/tweets/search/stream/rules****** |
2626
| [Authentication](/resources/fundamentals/authentication) | OAuth 1.0a User Context | HTTP Basic Authentication | OAuth 2.0 App-Only |
2727
| HTTP methods supported | POST | GET <br/>POST | GET <br/>POST |
28-
| Required parameters | Rule defined on connection as parameter, at least one of:<br/><br/>* ******follow******<br/>* ******track******<br/>* ******locations****** | No required parameters for streaming connection, optional backfill parameter.<br/><br/>Rules managed separately | No required parameters for streaming connection, optional parameters to define response format and add [backfill recovery feature](/x-api/posts/filtered-stream#recovering-missed-data-after-a-disconnection-backfill) for Academic Research access.<br/><br/>Rules managed separately |
28+
| Required parameters | Rule defined on connection as parameter, at least one of:<br/><br/>* ******follow******<br/>* ******track******<br/>* ******locations****** | No required parameters for streaming connection, optional backfill parameter.<br/><br/>Rules managed separately | No required parameters for streaming connection, optional parameters to define response format and add [backfill recovery feature](/x-api/fundamentals/recovery-and-redundancy) for Academic Research access.<br/><br/>Rules managed separately |
2929
| Delivery type | Streaming | Streaming<br/><br/>REST (for rules management) | Streaming<br/><br/>REST (for rules management) |
3030
| Default request rate limits | 5 connection attempts per 5 min | 60 requests per min aggregated for both POST and GET requests<br/><br/>/rules: 60 requests per minute, aggregated across all requests to /rules endpoint for the specific stream's API (POST and GET). | Depends on the endpoint. See [rate limits](/x-api/fundamentals/rate-limits) for current limits. |
3131
| Maximum allowed connections | 2 concurrent per authorized user | Supports multiple/redundant connections, determined by contract | Pay-per-use: 1 |
32-
| [Recovery and redundancy features](/x-api/posts/filtered-stream#filtered-stream-recovery-and-redundancy-features) | None | Backfill, redundant connections, and the Replay API | |
32+
| [Recovery and redundancy features](/x-api/fundamentals/recovery-and-redundancy) | None | Backfill, redundant connections, and the Replay API | |
3333
| Keep-alive signal/heartbeats | blank lines (\\r\\n or similar) at least every 20 seconds | blank lines (\\r\\n or similar) every 10 seconds | blank lines (\\r\\n or similar) at least every 20 seconds |
3434
| Latency | 10 seconds | 2 seconds<br/><br/>At least 10 seconds for URL unwinding enrichment | 10 seconds |
3535
| Maximum allowed rules | 1 rule (within the endpoint connection request) | Determined by contract up to 250,000 | Pay-per-use: 1,000 rules |
3636
| Rule filter limitations | One query per connection, up to either:<br/><br/>\- 400 track keywords<br/><br/>\- 5000 follow user IDs<br/><br/>\- 25 location boxes | Up to 2,048 characters per rule | Pay-per-use: 1,024 characters per rule |
3737
| [Post JSON format](/x-api/fundamentals/data-dictionary) | Standard v1.1 format | [Native Enriched](/x-api/enterprise-gnip-2.0/fundamentals/data-dictionary#native-enriched-tweet-object) or [Activity Streams]() (selected within the [console](/x-api/enterprise-gnip-2.0/fundamentals/overview)) | [X API v2 format](/x-api/fundamentals/data-dictionary) (determined by ******fields****** and ******expansions****** request parameters, not backward-compatible with v1.1 formats)<br/><br/>To learn more about how to migrate from the Standard v1.1 format to the X API v2 format, please visit our [data formats migration guide](/x-api/migrate/data-format-migration). We will be releasing additional data format migration guides for Native Enriched and Activity Streams soon. |
3838
| Provides Post edit history and metadata ||||
39-
| Unique Features | Filtering done via query parameters on connection request<br/><br/>No configuration UI | Filtering done via rules created through an independent endpoint<br/><br/>[Enrichment](/x-api/enterprise-gnip-2.0/enterprise-gnip#enrichments) features available in contract<br/><br/>Configuration on console.gnip.com UI | Filtering done via [rules](/x-api/posts/filtered-stream/integrate/build-a-rule) created through an independent endpoint<br/><br/>[Metrics](/x-api/fundamentals/metrics) and URL enrichment features included<br/><br/>Object [fields](/x-api/fundamentals/fields) and [expansions](/x-api/fundamentals/expansions) specified with request parameters<br/><br/>Post [Annotations](/x-api/fundamentals/post-annotations)<br/><br/>[Conversation ID](/x-api/fundamentals/conversation-id) operator and field<br/><br/>Configuration through [Developer Console](/resources/fundamentals/developer-portal) |
40-
41-
**Other migration resources**
42-
43-
[Standard v1.1 migration to X API v2](/x-api/posts/filtered-stream#standard-v1-1-compared-to-x-api-v2 "Standard v1.1 migration to X API v2")
44-
45-
[PowerTrack API migration to X API v2](/x-api/enterprise-gnip-2.0/powertrack-api#powertrack-operators "PowerTrack API migration to X API v2")
46-
47-
[X API migration hub](/x-api/migrate/overview)
48-
49-
[Check out some sample code for these endpoints](https://github.com/xdevplatform/Twitter-API-v2-sample-code "Check out some sample code for these endpoints")
39+
| Unique Features | Filtering done via query parameters on connection request<br/><br/>No configuration UI | Filtering done via rules created through an independent endpoint<br/><br/>[Enrichment](/x-api/enterprise-gnip-2.0/enterprise-gnip#enrichments) features available in contract<br/><br/>Configuration on console.gnip.com UI | Filtering done via [rules](/x-api/posts/filtered-stream/integrate/build-a-rule) created through an independent endpoint<br/><br/>[Metrics](/x-api/fundamentals/metrics) and URL enrichment features included<br/><br/>Object [fields](/x-api/fundamentals/fields) and [expansions](/x-api/fundamentals/expansions) specified with request parameters<br/><br/>Post [Annotations](/x-api/fundamentals/post-annotations)<br/><br/>[Conversation ID](/x-api/fundamentals/conversation-id) operator and field<br/><br/>Configuration through [Developer Console](/resources/fundamentals/developer-portal) |

x-api/posts/filtered-stream/migrate/powertrack-api-migration-to-twitter-api-v2.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ Similar to the PowerTrack API and Rules API, the new X API v2 filtered stream en
4949
| | | |
5050
| :--- | :--- | :--- |
5151
| **Feature** | **PowerTrack API** | **X API v2 filtered stream** |
52-
| **Connection endpoint** | [GET /stream](/x-api/enterprise-gnip-2.0/powertrack-api#api-reference-index) | [GET /2/tweets/search/stream](/x-api/posts/filtered-stream#get-2-tweets-search-stream.html) |
53-
| **Add rules** | [POST /rules](/x-api/posts/filtered-stream#get-2-tweets-search-stream) | [POST /2/tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) |
54-
| **Get rules** | [GET /rules](/x-api/enterprise-gnip-2.0/powertrack-api#get-rules) | [GET /2/tweets/search/stream/rules](/x-api/posts/filtered-stream#get-2-tweets-search-stream-rules) |
55-
| **Delete rules** | [POST /rules_method=delete](/x-api/enterprise-gnip-2.0/powertrack-api#post-rules-method-delete) | [POST /2/tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) |
52+
| **Connection endpoint** | GET /stream | [GET /2/tweets/search/stream](/x-api/stream/stream-filtered-posts) |
53+
| **Add rules** | POST /rules | [POST /2/tweets/search/stream/rules](/x-api/stream/update-stream-rules) |
54+
| **Get rules** | GET /rules | [GET /2/tweets/search/stream/rules](/x-api/stream/get-stream-rules) |
55+
| **Delete rules** | POST /rules_method=delete | [POST /2/tweets/search/stream/rules](/x-api/stream/update-stream-rules) |
5656

5757
**Rule syntax, operators, and matching rules logic**
5858

59-
The X API v2 filtered stream uses a subset of the same rule operators currently used for PowerTrack rules. These operators are used to create boolean based rule syntax used for filtering desired matching Posts from the live stream.  Both PowerTrack and filtered stream use the same rule syntax for building rules and matching logic is the same. While the majority of the operators are available for both PowerTrack and filter stream, there are a few notable differences and net new operators listed below.  For more details and example uses for each operator see current [PowerTrack operators](/x-api/enterprise-gnip-2.0/powertrack-api#powertrack-operators) and current X API v2 [filtered stream operators](/x-api/posts/filtered-stream#building-rules-for-filtered-stream)
59+
The X API v2 filtered stream uses a subset of the same rule operators currently used for PowerTrack rules. These operators are used to create boolean based rule syntax used for filtering desired matching Posts from the live stream.  Both PowerTrack and filtered stream use the same rule syntax for building rules and matching logic is the same. While the majority of the operators are available for both PowerTrack and filter stream, there are a few notable differences and net new operators listed below.  For more details and example uses for each operator see current [PowerTrack operators](/x-api/enterprise-gnip-2.0/powertrack-api#powertrack-operators) and current X API v2 [filtered stream operators](/x-api/posts/filtered-stream/integrate/operators)
6060

6161
Please note that many operators (noted as 'advanced operators') are reserved for those users who have been approved for [Academic Research access or Enterprise access](/x-api/getting-started/about-x-api).
6262

@@ -78,7 +78,7 @@ Operators available with both PowerTrack and X API v2 Filtered stream:
7878

7979
**Support for Post edit history and metadata**
8080

81-
Both versions provide metadata that describes any edit history. Check out the [filtered stream API References](/x-api/posts/filtered-stream#api-reference-index) and the [Edit Posts fundamentals page](/x-api/fundamentals/edit-posts) for more details. 
81+
Both versions provide metadata that describes any edit history. Check out the [filtered stream API References](/x-api/posts/filtered-stream/introduction) and the [Edit Posts fundamentals page](/x-api/fundamentals/edit-posts) for more details. 
8282

8383
#### Differences
8484

x-api/posts/filtered-stream/migrate/standard-to-twitter-api-v2.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you have been working with the v1.1 [statuses/filter](https://developer.x.co
2525

2626
**Request parameters and operators**
2727

28-
The standard v1.1 statuses/filter endpoint features a few parameters that can be passed along with the request to filter the stream. With v2 filtered stream, you instead use a set of [operators](/x-api/posts/filtered-stream#building-rules-for-filtered-stream) that can be connected together using boolean logic to filter for desired Posts. The available operators include some that are direct replacements for the existing standard v1.1 parameters. 
28+
The standard v1.1 statuses/filter endpoint features a few parameters that can be passed along with the request to filter the stream. With v2 filtered stream, you instead use a set of [operators](/x-api/posts/filtered-stream/integrate/operators) that can be connected together using boolean logic to filter for desired Posts. The available operators include some that are direct replacements for the existing standard v1.1 parameters. 
2929

3030
The following standard v1.1 request parameters have equivalent operators in X API v2:
3131

@@ -37,7 +37,7 @@ The following standard v1.1 request parameters have equivalent operators in X AP
3737

3838
**Support for Post edit history and metadata**
3939

40-
Both versions provide metadata that describes any edit history. Check out the [filtered stream API References](/x-api/posts/filtered-stream#api-reference-index) and the [Post edits fundamentals page](/x-api/fundamentals/edit-posts) for more details. 
40+
Both versions provide metadata that describes any edit history. Check out the [filtered stream API References](/x-api/posts/filtered-stream/introduction) and the [Post edits fundamentals page](/x-api/fundamentals/edit-posts) for more details. 
4141

4242
#### Differences
4343

@@ -111,7 +111,7 @@ Redundant connections allows you to connect to a given stream up to two times, w
111111

112112
The backfill_minutes parameter can be used to recover up to five minutes of missed data. 
113113

114-
Both of these features are only available via [Academic Research access](/x-api/getting-started/about-x-api). You can learn more about this functionality via our [recovery and redundancy features](/x-api/posts/filtered-stream#filtered-stream-recovery-and-redundancy-features) integration guide. 
114+
Both of these features are only available via [Academic Research access](/x-api/getting-started/about-x-api). You can learn more about this functionality via our [recovery and redundancy features](/x-api/fundamentals/recovery-and-redundancy) integration guide. 
115115

116116
**New query operators**
117117

x-api/posts/timelines/migrate/standard-to-twitter-api-v2.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The v1.1 statuses/mentions_timeline and the X API v2 user mention timeline endpo
5050

5151
**Support for Post edit history and metadata**
5252

53-
Both versions provide metadata that describes any edit history. Check out the [filtered stream API References](/x-api/posts/filtered-stream#api-reference-index) and the [Edit Posts fundamentals page](/x-api/fundamentals/edit-posts) for more details.
53+
Both versions provide metadata that describes any edit history. Check out the [filtered stream API References](/x-api/posts/filtered-stream/introduction) and the [Edit Posts fundamentals page](/x-api/fundamentals/edit-posts) for more details.
5454

5555
**Rate Limits**
5656

0 commit comments

Comments
 (0)