Skip to content

Commit 7086775

Browse files
committed
added docs and some minor changes
1 parent 658decb commit 7086775

File tree

9 files changed

+411
-158
lines changed

9 files changed

+411
-158
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can find examples of using the SDK under the [examples/](examples/) director
66

77
**Note: Only Twitter API V2 is supported**
88

9-
- API version: 2.45
9+
- API version: 2.46
1010

1111
Twitter API v2 available endpoints
1212

@@ -228,8 +228,8 @@ In order to use the retry mechanism call the APIs with an additional parameter `
228228

229229
```java
230230
int retries = 4;
231-
streamResult = apiInstance.tweets()apiInstance.tweets().sampleStream()
232-
.tweetFields(tweetFields)
231+
streamResult = apiInstance.tweets().sampleStream()
232+
.parameters(new StreamQueryParameters.Builder.withTweetFields(tweetFields).build())
233233
.execute(retries);
234234

235235
```
@@ -530,6 +530,13 @@ Class | Method | HTTP request | Description
530530
- [VideoAllOfPromotedMetrics](docs/VideoAllOfPromotedMetrics.md)
531531
- [VideoAllOfPublicMetrics](docs/VideoAllOfPublicMetrics.md)
532532

533+
## Documentation for Stream Functionality
534+
535+
536+
Class | Method | HTTP request | Description
537+
------------ |--------------------------------------------------------| ------------- | -------------
538+
*TwitterStream* | [**sampleStream**](docs/TwitterStream.md#sampleStream) | **GET** /2/tweets/sample/stream | Processing stream with multiple threads accepts listeners with the produced tweets
539+
533540

534541

535542

docs/StreamQueryParameters.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
2+
3+
# StreamQueryParameters
4+
5+
6+
## Properties
7+
8+
9+
| Name | Type | Description | Notes |
10+
|------------- |----------------------------------------------| ------------- | -------------|
11+
| **backfillMinutes** | **Integer** | The number of minutes of backfill requested. | [optional] |
12+
| **tweetFields** | [**Collection<TweetField>**](#TweetField) | A comma separated list of Tweet fields to display. | [optional] [enum: attachments, author_id, context_annotations, conversation_id, created_at, entities, geo, id, in_reply_to_user_id, lang, non_public_metrics, organic_metrics, possibly_sensitive, promoted_metrics, public_metrics, referenced_tweets, reply_settings, source, text, withheld] |
13+
| **expansions** | [**Collection<Expansion>**](#Expansion) | A comma separated list of fields to expand. | [optional] [enum: attachments.media_keys, attachments.poll_ids, author_id, entities.mentions.username, geo.place_id, in_reply_to_user_id, referenced_tweets.id, referenced_tweets.id.author_id] |
14+
| **mediaFields** | [**Collection<MediaField>**](#MediaField) | A comma separated list of Media fields to display. | [optional] [enum: alt_text, duration_ms, height, media_key, non_public_metrics, organic_metrics, preview_image_url, promoted_metrics, public_metrics, type, url, variants, width] |
15+
| **pollFields** | [**Collection<PollField>**](#PollField) | A comma separated list of Poll fields to display. | [optional] [enum: duration_minutes, end_datetime, id, options, voting_status] |
16+
| **userFields** | [**Collection<UserField>**](#UserField) | A comma separated list of User fields to display. | [optional] [enum: created_at, description, entities, id, location, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, withheld] |
17+
| **placeFields** | [**Collection<PlaceField>**](#PlaceField) | A comma separated list of Place fields to display. | [optional] [enum: contained_within, country, country_code, full_name, geo, id, name, place_type] |
18+
19+
20+
21+
22+
## Enum: TweetField
23+
24+
| Name | Value |
25+
|---- | -----|
26+
|ATTACHMENTS|"attachments"|
27+
|AUTHOR_ID|"author_id"|
28+
|CONTEXT_ANNOTATIONS|"context_annotations"|
29+
|CONVERSATION_ID|"conversation_id"|
30+
|CREATED_AT|"created_at"|
31+
|ENTITIES|"entities"|
32+
|GEO|"geo"|
33+
|ID|"id"|
34+
|IN_REPLY_TO_USER_ID|"in_reply_to_user_id"|
35+
|LANG|"lang"|
36+
|POSSIBLE_SENSITIVE|"possibly_sensitive"|
37+
|PUBLIC_METRICS|"public_metrics"|
38+
|REFERENCED_TWEETS|"referenced_tweets"|
39+
|REPLY_SETTINGS|"reply_settings"|
40+
|SOURCE|"source"|
41+
|TEXT|"text"|
42+
|WITHHELD|"withheld"|
43+
44+
45+
## Enum: Expansion
46+
47+
| Name | Value |
48+
|---- | -----|
49+
|ATTACHMENTS_MEDIA_KEYS|"attachments.media_keys"|
50+
|ATTACHMENTS_POLL_IDS|"attachments.poll_ids"|
51+
|AUTHOR_ID|"author_id"|
52+
|ENTITIES_MENTIONS_USERNAME|"entities.mentions.username"|
53+
|GEO_PLACE_ID|"geo.place_id"|
54+
|IN_REPLY_TO_USER_ID|"in_reply_to_user_id"|
55+
|REFERENCED_TWEETS_ID|"referenced_tweets.id"|
56+
|REFERENCED_TWEETS_ID_AUTHOR_ID|"referenced_tweets.id.author_id"|
57+
58+
## Enum: MediaField
59+
60+
| Name | Value |
61+
|---- | -----|
62+
|ALT_TEXT|"alt_text"|
63+
|DURATION_MS|"duration_ms"|
64+
|HEIGHT|"height"|
65+
|MEDIA_KEY|"media_key"|
66+
|PREVIEW_IMAGE_URL|"preview_image_url"|
67+
|PUBLIC_METRICS|"public_metrics"|
68+
|TYPE|"type"|
69+
|URL|"url"|
70+
|VARIANTS|"variants"|
71+
|WIDTH|"width"|
72+
73+
74+
## Enum: PollField
75+
76+
| Name | Value |
77+
|---- | -----|
78+
|DURATION_MINUTES|"duration_minutes"|
79+
|END_DATETIME|"end_datetime"|
80+
|ID|"id"|
81+
|OPTIONS|"options"|
82+
|VOTING_STATUS|"voting_status"|
83+
84+
## Enum: UserField
85+
86+
| Name | Value |
87+
|---- | -----|
88+
|CREATED_AT|"created_at"|
89+
|DESCRIPTION|"description"|
90+
|ENTITIES|"entities"|
91+
|ID|"id"|
92+
|LOCATION|"location"|
93+
|NAME|"name"|
94+
|PINNED_TWEET_ID|"pinned_tweet_id"|
95+
|PROFILE_IMAGE_URL|"profile_image_url"|
96+
|PROTECTED|"protected"|
97+
|PUBLIC_METRICS|"public_metrics"|
98+
|URL|"url"|
99+
|USERNAME|"username"|
100+
|VERIFIED|"verified"|
101+
|WITHHELD|"withheld"|
102+
103+
## Enum: PlaceField
104+
105+
| Name | Value |
106+
|---- | -----|
107+
|CONTAINED_WITHIN|"contained_within"|
108+
|COUNTRY|"country"|
109+
|COUNTRY_CODE|"country_code"|
110+
|FULL_NAME|"full_name"|
111+
|GEO|"geo"|
112+
|ID|"id"|
113+
|NAME|"name"|
114+
|PLACE_TYPE|"place_type"|

0 commit comments

Comments
 (0)