Skip to content

Commit 0adf7b5

Browse files
committed
Various naming cleanups
1 parent f1f6b69 commit 0adf7b5

File tree

20 files changed

+39
-39
lines changed

20 files changed

+39
-39
lines changed

Examples - Account Activity/Examplinvi.AccountActivityEvents/AccountActivityEventsManager.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void RegisterAccountActivityStream(IAccountActivityStream accountActivity
3232
accountActivityStream.MessageSent += MessageSent;
3333

3434
accountActivityStream.UserIsTypingMessage += UserIsTypingMessage;
35-
accountActivityStream.UserReadMessage += UserReadMessage;
35+
accountActivityStream.UserReadMessageConversation += UserReadMessage;
3636

3737
// User events
3838
accountActivityStream.UserFollowed += FollowedUser;
@@ -69,7 +69,7 @@ public void UnregisterAccountActivityStream(IAccountActivityStream accountActivi
6969
accountActivityStream.MessageSent -= MessageSent;
7070

7171
accountActivityStream.UserIsTypingMessage -= UserIsTypingMessage;
72-
accountActivityStream.UserReadMessage -= UserReadMessage;
72+
accountActivityStream.UserReadMessageConversation -= UserReadMessage;
7373

7474
// User events
7575
accountActivityStream.UserFollowed -= FollowedUser;

Tests/xUnitinvi/EndToEnd/AccountActivityStreamEndToEndTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private static void RegisterEvents(IAccountActivityStream stream, AccountActivty
155155
stream.MessageSent += (sender, args) => { state.MessageSent.Add(args); };
156156

157157
stream.UserIsTypingMessage += (sender, args) => { state.UserTypingMessage.Add(args); };
158-
stream.UserReadMessage += (sender, args) => { state.UserReadMessage.Add(args); };
158+
stream.UserReadMessageConversation += (sender, args) => { state.UserReadMessage.Add(args); };
159159

160160
stream.UnexpectedExceptionThrown += (sender, args) => { state.UnexpectedException.Add(args); };
161161
}

Tests/xUnitinvi/Streams/AccountActivityStreamTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ public void UserReadMessage()
10321032
}";
10331033

10341034
var eventsReceived = new List<UserReadMessageConversationEvent>();
1035-
activityStream.UserReadMessage += (sender, args) =>
1035+
activityStream.UserReadMessageConversation += (sender, args) =>
10361036
{
10371037
eventsReceived.Add(args);
10381038
};

src/Tweetinvi.Controllers/Properties/Resources.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ public static class Resources
471471
/// <summary>
472472
/// Looks up a localized string similar to https://api.twitter.com/1.1/favorites/list.json?{0}&amp;count={1}.
473473
/// </summary>
474-
public static string User_GetFavourites = "https://api.twitter.com/1.1/favorites/list.json?";
474+
public static string User_GetFavorites = "https://api.twitter.com/1.1/favorites/list.json?";
475475

476476
/// <summary>
477477
/// Looks up a localized string similar to https://api.twitter.com/1.1/followers/ids.json?.

src/Tweetinvi.Controllers/Tweet/TweetQueryExecutor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public Task<ITwitterResult<ITweetDTO>> DestroyTweetAsync(IDestroyTweetParameters
123123
return _twitterAccessor.ExecuteRequestAsync<ITweetDTO>(request);
124124
}
125125

126-
// Favourite Tweet
126+
// Favorite Tweet
127127
public Task<ITwitterResult<ITweetDTO[]>> GetFavoriteTweetsAsync(IGetUserFavoriteTweetsParameters parameters, ITwitterRequest request)
128128
{
129129
var query = _tweetQueryGenerator.GetFavoriteTweetsQuery(parameters, request.ExecutionContext.TweetMode);

src/Tweetinvi.Controllers/Tweet/TweetQueryGenerator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public string GetDestroyTweetQuery(IDestroyTweetParameters parameters, TweetMode
143143
public string GetFavoriteTweetsQuery(IGetUserFavoriteTweetsParameters parameters, TweetMode? requestTweetMode)
144144
{
145145
var userParameter = _userQueryParameterGenerator.GenerateIdOrScreenNameParameter(parameters.User);
146-
var query = new StringBuilder(Resources.User_GetFavourites + userParameter);
146+
var query = new StringBuilder(Resources.User_GetFavorites + userParameter);
147147

148148
query.AddParameterToQuery("include_entities", parameters.IncludeEntities);
149149
_queryParameterGenerator.AddMinMaxQueryParameters(query, parameters);

src/Tweetinvi.Core/Core/Models/CredentialsRateLimits.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public string RateLimitContext
8080
public IEndpointRateLimit DirectMessagesShowLimit => CredentialsRateLimitsDTO?.Resources?.DirectMessagesRateLimits["/direct_messages/events/show"];
8181
public IEndpointRateLimit DirectMessagesListLimit => CredentialsRateLimitsDTO?.Resources?.DirectMessagesRateLimits["/direct_messages/events/list"];
8282

83-
// Favourites
83+
// Favorites
8484
public IEndpointRateLimit FavoritesListLimit => CredentialsRateLimitsDTO?.Resources?.FavoritesRateLimits["/favorites/list"];
8585

8686
// Feedback

src/Tweetinvi.Core/Core/Models/User.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public string ProfileImageUrl400x400
109109

110110
public bool DefaultProfileImage => UserDTO.DefaultProfileImage;
111111

112-
public int FavouritesCount => UserDTO.FavoritesCount ?? 0;
112+
public int FavoritesCount => UserDTO.FavoritesCount ?? 0;
113113

114114
public int ListedCount => UserDTO.ListedCount ?? 0;
115115

src/Tweetinvi.Core/Public/Events/AccountActivity/EventKnownButNotSupported.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
/// </summary>
77
public class EventKnownButNotSupported
88
{
9-
public EventKnownButNotSupported(string fullJson, BaseAccountActivityEventArgs accountActivityEventArgs)
9+
public EventKnownButNotSupported(string json, BaseAccountActivityEventArgs accountActivityEventArgs)
1010
{
11-
FullJson = fullJson;
11+
Json = json;
1212
EventArgs = accountActivityEventArgs;
1313
}
1414

1515
/// <summary>
1616
/// The json object that Tweetinvi could not fully understand
1717
/// </summary>
18-
public string FullJson { get; }
18+
public string Json { get; }
1919

2020
public BaseAccountActivityEventArgs EventArgs { get; }
2121
}

src/Tweetinvi.Core/Public/Events/AccountActivity/TweetDeletedEvent.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public enum TweetDeletedRaisedInResultOf
55
/// <summary>
66
/// The tweet was deleted by another user
77
/// </summary>
8-
AnotherPersonDeletedATweet = 0,
8+
AnotherUserDeletedATweet = 0,
99

1010
/// <summary>
1111
/// The tweet was deleted by the account user.
@@ -43,7 +43,7 @@ private TweetDeletedRaisedInResultOf GetInResultOf()
4343
return TweetDeletedRaisedInResultOf.AccountUserDeletingOneOfHisTweets;
4444
}
4545

46-
return TweetDeletedRaisedInResultOf.AnotherPersonDeletedATweet;
46+
return TweetDeletedRaisedInResultOf.AnotherUserDeletedATweet;
4747
}
4848
}
4949
}

src/Tweetinvi.Core/Public/Events/AccountActivity/TweetFavouritedEvent.cs src/Tweetinvi.Core/Public/Events/AccountActivity/TweetFavoritedEvent.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ public enum TweetFavoritedRaisedInResultOf
1414
/// <summary>
1515
/// The account user Favorited one of his own tweet
1616
/// </summary>
17-
AccountUserFavouritingHisOwnTweet,
17+
AccountUserFavoritingHisOwnTweet,
1818

1919
/// <summary>
2020
/// The account user facourited a tweet of another user
2121
/// </summary>
22-
AccountUserFavouritingATweetOfAnotherUser,
22+
AccountUserFavoritingATweetOfAnotherUser,
2323

2424
/// <summary>
2525
/// Another user Favorited the tweet of the account user
2626
/// </summary>
27-
AnotherUserFavouritingATweetOfTheAccountUser,
27+
AnotherUserFavoritingATweetOfTheAccountUser,
2828
}
2929

3030
/// <summary>
@@ -53,17 +53,17 @@ private TweetFavoritedRaisedInResultOf GetInResultOf()
5353
{
5454
if (FavoritedBy.Id == AccountUserId && Tweet.CreatedBy.Id == AccountUserId)
5555
{
56-
return TweetFavoritedRaisedInResultOf.AccountUserFavouritingHisOwnTweet;
56+
return TweetFavoritedRaisedInResultOf.AccountUserFavoritingHisOwnTweet;
5757
}
5858

5959
if (FavoritedBy.Id == AccountUserId)
6060
{
61-
return TweetFavoritedRaisedInResultOf.AccountUserFavouritingATweetOfAnotherUser;
61+
return TweetFavoritedRaisedInResultOf.AccountUserFavoritingATweetOfAnotherUser;
6262
}
6363

6464
if (Tweet.CreatedBy.Id == AccountUserId)
6565
{
66-
return TweetFavoritedRaisedInResultOf.AnotherUserFavouritingATweetOfTheAccountUser;
66+
return TweetFavoritedRaisedInResultOf.AnotherUserFavoritingATweetOfTheAccountUser;
6767
}
6868

6969
return TweetFavoritedRaisedInResultOf.Unknown;

src/Tweetinvi.Core/Public/Events/AccountActivity/UserReadMessageConversationEvent.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public enum UserReadMessageConversationInResultOf
1313
/// <summary>
1414
/// Another user has read a message sent by the account user
1515
/// </summary>
16-
AnotherUserReadingMessageConversationWithAccountUser,
16+
AnotherUserReadingConversation,
1717
}
1818

1919
/// <summary>
@@ -54,7 +54,7 @@ private UserReadMessageConversationInResultOf GetInResultOf()
5454
{
5555
if (UserWhoReadTheMessageConversation.Id != AccountUserId && UserWhoWroteTheMessage.Id == AccountUserId)
5656
{
57-
return UserReadMessageConversationInResultOf.AnotherUserReadingMessageConversationWithAccountUser;
57+
return UserReadMessageConversationInResultOf.AnotherUserReadingConversation;
5858
}
5959

6060
return UserReadMessageConversationInResultOf.Unknown;

src/Tweetinvi.Core/Public/Events/AccountActivity/UserUnmutedEvent.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public enum UserUnmutedRaisedInResultOf
1414
/// <summary>
1515
/// The account user has Unmuted another user
1616
/// </summary>
17-
AccountUserMutingAnotherUser,
17+
AccountUserUnmutingAnotherUser,
1818
}
1919

2020
/// <summary>
@@ -44,7 +44,7 @@ private UserUnmutedRaisedInResultOf GetInResultOf()
4444
{
4545
if (UnmutedBy.Id == AccountUserId)
4646
{
47-
return UserUnmutedRaisedInResultOf.AccountUserMutingAnotherUser;
47+
return UserUnmutedRaisedInResultOf.AccountUserUnmutingAnotherUser;
4848
}
4949

5050
return UserUnmutedRaisedInResultOf.Unknown;

src/Tweetinvi.Core/Public/Models/Interfaces/ITweet.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ public interface ITweet : ITweetIdentifier, IEquatable<ITweet>
263263

264264
#endregion
265265

266-
#region Favourites
266+
#region Favorites
267267

268268
/// <summary>
269269
/// Favorites the tweet
270270
/// </summary>
271271
Task FavoriteAsync();
272272

273273
/// <summary>
274-
/// Remove the tweet from favourites
274+
/// Remove the tweet from favorites
275275
/// </summary>
276276
Task UnfavoriteAsync();
277277

src/Tweetinvi.Core/Public/Models/Interfaces/IUser.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public interface IUser : IUserIdentifier, IEquatable<IUser>
144144
/// <summary>
145145
/// Number of tweets this user has Favorited in the account’s lifetime.
146146
/// </summary>
147-
int FavouritesCount { get; }
147+
int FavoritesCount { get; }
148148

149149
/// <summary>
150150
/// The number of public lists that this user is a member of.

src/Tweetinvi.Core/Public/Models/RateLimits/ICredentialsRateLimits.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public interface ICredentialsRateLimits
8686
[TwitterEndpoint("https://api.twitter.com/1.1/direct_messages/events/list.json")]
8787
IEndpointRateLimit DirectMessagesListLimit { get; }
8888

89-
// FAVOURITES
89+
// FAVORITES
9090
[TwitterEndpoint("https://api.twitter.com/1.1/favorites/list.json")]
9191
IEndpointRateLimit FavoritesListLimit { get; }
9292

src/Tweetinvi.Core/Public/Streaming/IAccountActivityStream.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public interface IAccountActivityStream
8585
/// <summary>
8686
/// A user has read a message from the account user
8787
/// </summary>
88-
EventHandler<UserReadMessageConversationEvent> UserReadMessage { get; set; }
88+
EventHandler<UserReadMessageConversationEvent> UserReadMessageConversation { get; set; }
8989

9090
// Permissions
9191

src/Tweetinvi.Streams/AccountActivityStream.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private void InitializeEvents()
8181
public EventHandler<MessageReceivedEvent> MessageReceived { get; set; }
8282
public EventHandler<MessageSentEvent> MessageSent { get; set; }
8383
public EventHandler<UserIsTypingMessageEvent> UserIsTypingMessage { get; set; }
84-
public EventHandler<UserReadMessageConversationEvent> UserReadMessage { get; set; }
84+
public EventHandler<UserReadMessageConversationEvent> UserReadMessageConversation { get; set; }
8585

8686
// Others
8787
public EventHandler<UnsupportedMessageReceivedEvent> UnsupportedEventReceived { get; set; }
@@ -186,14 +186,14 @@ private void TryRaiseTweetDeletedEvents(string eventName, JObject jsonObjectEven
186186
private void TryRaiseTweetFavoritedEvents(string eventName, JObject jsonObjectEvent)
187187
{
188188
var json = jsonObjectEvent.ToString();
189-
var favouriteTweetEvent = jsonObjectEvent[eventName];
190-
var FavoritedTweetEventJson = favouriteTweetEvent.ToString();
191-
var favouriteEventDTOs = _jsonObjectConverter.Deserialize<AccountActivityFavouriteEventDTO[]>(FavoritedTweetEventJson);
189+
var favoriteTweetEvent = jsonObjectEvent[eventName];
190+
var FavoritedTweetEventJson = favoriteTweetEvent.ToString();
191+
var favoriteEventDTOs = _jsonObjectConverter.Deserialize<AccountActivityFavoriteEventDTO[]>(FavoritedTweetEventJson);
192192

193-
favouriteEventDTOs.ForEach(favouriteEventDTO =>
193+
favoriteEventDTOs.ForEach(favoriteEventDTO =>
194194
{
195-
var tweet = _factories.CreateTweet(favouriteEventDTO.FavoritedTweet);
196-
var user = _factories.CreateUser(favouriteEventDTO.User);
195+
var tweet = _factories.CreateTweet(favoriteEventDTO.FavoritedTweet);
196+
var user = _factories.CreateUser(favoriteEventDTO.User);
197197

198198
var accountActivityEvent = new AccountActivityEvent<Tuple<ITweet, IUser>>(new Tuple<ITweet, IUser>(tweet, user))
199199
{
@@ -505,7 +505,7 @@ private void TryRaiseMessageReadEvent(string eventName, JObject jsonObjectEvent)
505505

506506
var eventArgs = new UserReadMessageConversationEvent(activityEvent, sender, recipient, messageConversationReadEvent.LastReadEventId);
507507

508-
this.Raise(UserReadMessage, eventArgs);
508+
this.Raise(UserReadMessageConversation, eventArgs);
509509

510510
if (eventArgs.InResultOf == UserReadMessageConversationInResultOf.Unknown)
511511
{

src/Tweetinvi.Streams/Model/AccountActivity/AccountActivityFavouriteEventDTO.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Tweetinvi.Streams.Model.AccountActivity
55
{
6-
public class AccountActivityFavouriteEventDTO
6+
public class AccountActivityFavoriteEventDTO
77
{
88
public string Id { get; set; }
99

src/Tweetinvi/Client/Clients/TweetsClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ public async Task<ITweet[]> GetUserFavoriteTweetsAsync(IGetUserFavoriteTweetsPar
202202
return (await iterator.NextPageAsync().ConfigureAwait(false)).ToArray();
203203
}
204204

205-
#region Favourite Tweets
205+
#region Favorite Tweets
206206

207207
public ITwitterIterator<ITweet, long?> GetUserFavoriteTweetsIterator(long userId)
208208
{

0 commit comments

Comments
 (0)