Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Merge #321
Browse files Browse the repository at this point in the history
321: feat: fixed for the issue (#306) r=myConsciousness a=myConsciousness

# 1. Description

<!-- Provide a description of what this PR is doing.
If you're modifying existing behavior, describe the existing behavior, how this PR is changing it,
and what motivated the change. If this is a breaking change, specify explicitly which APIs have been
changed. -->

## 1.1. Checklist

<!-- Before you create this PR confirm that it meets all requirements listed below by checking the
relevant checkboxes (`[x]`). This will ensure a smooth and quick review process. -->

- [x] The title of my PR starts with a [Conventional Commit] prefix (`fix:`, `feat:`, `docs:` etc).
- [x] I have read the [Contributor Guide] and followed the process outlined for submitting PRs.
- [x] I have updated/added tests for ALL new/updated/fixed functionality.
- [x] I have updated/added relevant documentation in `docs` and added dartdoc comments with `///`.
- [x] I have updated/added relevant examples in `examples`.

## 1.2. Breaking Change

<!-- Does your PR require users to manually update their apps to accommodate your change?

If the PR is a breaking change this should be indicated with suffix "!"  (for example, `feat!:`, `fix!:`). See [Conventional Commit] for details.
-->

- [ ] Yes, this is a breaking change.
- [x] No, this is _not_ a breaking change.

## 1.3. Related Issues

<!-- Provide a list of issues related to this PR from the [issue database].
Indicate which of these issues are resolved or fixed by this PR, i.e. Fixes #xxxx* !-->

<!-- Links -->

[issue database]: https://github.com/twitter-dart/twitter-api-v2/issues
[contributor guide]: https://github.com/twitter-dart/twitter-api-v2/blob/main/CONTRIBUTING.md
[style guide]: https://github.com/twitter-dart/twitter-api-v2/blob/main/STYLEGUIDE.md
[conventional commit]: https://conventionalcommits.org


Co-authored-by: myConsciousness <kato.shinya.dev@gmail.com>
Co-authored-by: Kato Shinya / 加藤 真也 <kato.shinya.dev@gmail.com>
  • Loading branch information
bors[bot] and myConsciousness authored Jun 27, 2022
2 parents 363390a + 333f38f commit dfe27a1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
- Added `sinceTweetId` and `untilTweetId` parameters to `TweetsService.lookupTweets`. ([#309](https://github.com/twitter-dart/twitter-api-v2/issues/309))
- Added `excludes` parameter to `TweetsService.lookupTweets`. ([#308](https://github.com/twitter-dart/twitter-api-v2/issues/308))
- Added `sinceTweetId` and `untilTweetId` parameters to `lookupHomeTimeline`. ([#307](https://github.com/twitter-dart/twitter-api-v2/issues/307))
- Added `excludes` parameter to `lookupHomeTimeline`. ([#306](https://github.com/twitter-dart/twitter-api-v2/issues/306))
- Added `sinceTweetId` and `untilTweetId` parameters to `lookupMentions`. ([#305](https://github.com/twitter-dart/twitter-api-v2/issues/305))

## v2.7.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

enum TweetExcludeType {
enum ExcludeTweetType {
retweets,
replies,
}
12 changes: 9 additions & 3 deletions lib/src/service/tweets/tweets_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import '../users/user_data.dart';
import '../users/user_expansion.dart';
import '../users/user_field.dart';
import '../users/user_meta.dart';
import 'exclude_tweet_type.dart';
import 'filtering_rule_data.dart';
import 'filtering_rule_meta.dart';
import 'filtering_rule_param.dart';
Expand All @@ -29,7 +30,6 @@ import 'tweet_count_data.dart';
import 'tweet_count_granularity.dart';
import 'tweet_count_meta.dart';
import 'tweet_data.dart';
import 'tweet_exclude_type.dart';
import 'tweet_expansion.dart';
import 'tweet_field.dart';
import 'tweet_geo_param.dart';
Expand Down Expand Up @@ -1973,7 +1973,7 @@ abstract class TweetsService {
DateTime? endTime,
String? sinceTweetId,
String? untilTweetId,
List<TweetExcludeType>? excludes,
List<ExcludeTweetType>? excludes,
List<TweetExpansion>? expansions,
List<TweetField>? tweetFields,
List<UserField>? userFields,
Expand Down Expand Up @@ -2037,6 +2037,9 @@ abstract class TweetsService {
/// occurred since the [untilTweetId], the [untilTweetId]
/// will be forced to the most recent ID available.
///
/// - [excludes]: The list of the types of Tweets to exclude from the
/// response.
///
/// - [expansions]: Expansions enable you to request additional data objects
/// that relate to the originally returned Tweets. Submit a
/// list of desired expansions in a comma-separated list
Expand Down Expand Up @@ -2124,6 +2127,7 @@ abstract class TweetsService {
DateTime? endTime,
String? sinceTweetId,
String? untilTweetId,
List<ExcludeTweetType>? excludes,
List<TweetExpansion>? expansions,
List<TweetField>? tweetFields,
List<UserField>? userFields,
Expand Down Expand Up @@ -3014,7 +3018,7 @@ class _TweetsService extends BaseService implements TweetsService {
DateTime? endTime,
String? sinceTweetId,
String? untilTweetId,
List<TweetExcludeType>? excludes,
List<ExcludeTweetType>? excludes,
List<TweetExpansion>? expansions,
List<TweetField>? tweetFields,
List<UserField>? userFields,
Expand Down Expand Up @@ -3055,6 +3059,7 @@ class _TweetsService extends BaseService implements TweetsService {
DateTime? endTime,
String? sinceTweetId,
String? untilTweetId,
List<ExcludeTweetType>? excludes,
List<TweetExpansion>? expansions,
List<TweetField>? tweetFields,
List<UserField>? userFields,
Expand All @@ -3073,6 +3078,7 @@ class _TweetsService extends BaseService implements TweetsService {
'end_time': endTime,
'since_id': sinceTweetId,
'until_id': untilTweetId,
'exclude': excludes,
'expansions': expansions,
'tweet.fields': tweetFields,
'user.fields': userFields,
Expand Down
2 changes: 1 addition & 1 deletion lib/twitter_api_v2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export 'package:twitter_api_v2/src/service/spaces/space_language.dart';
export 'package:twitter_api_v2/src/service/spaces/space_meta.dart';
export 'package:twitter_api_v2/src/service/spaces/space_state.dart';
export 'package:twitter_api_v2/src/service/spaces/spaces_service.dart';
export 'package:twitter_api_v2/src/service/tweets/exclude_tweet_type.dart';
export 'package:twitter_api_v2/src/service/tweets/filtering_rule_data.dart';
export 'package:twitter_api_v2/src/service/tweets/filtering_rule_meta.dart';
export 'package:twitter_api_v2/src/service/tweets/filtering_rule_param.dart';
Expand All @@ -59,7 +60,6 @@ export 'package:twitter_api_v2/src/service/tweets/tweet_count_granularity.dart';
export 'package:twitter_api_v2/src/service/tweets/tweet_count_meta.dart';
export 'package:twitter_api_v2/src/service/tweets/tweet_data.dart';
export 'package:twitter_api_v2/src/service/tweets/tweet_entities.dart';
export 'package:twitter_api_v2/src/service/tweets/tweet_exclude_type.dart';
export 'package:twitter_api_v2/src/service/tweets/tweet_expansion.dart';
export 'package:twitter_api_v2/src/service/tweets/tweet_field.dart';
export 'package:twitter_api_v2/src/service/tweets/tweet_geo_param.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:twitter_api_v2/twitter_api_v2.dart';

void main() {
test('.name', () {
expect(TweetExcludeType.retweets.name, 'retweets');
expect(TweetExcludeType.replies.name, 'replies');
expect(ExcludeTweetType.retweets.name, 'retweets');
expect(ExcludeTweetType.replies.name, 'replies');
});
}

0 comments on commit dfe27a1

Please sign in to comment.