Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Commit

Permalink
Clean Up and Add RPC Messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Sky Morey committed Jan 11, 2018
1 parent 64a4de2 commit b2da5be
Show file tree
Hide file tree
Showing 94 changed files with 973 additions and 1,013 deletions.
7 changes: 1 addition & 6 deletions SlackAPI.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using SlackAPI;
using System;
using System.Collections.Generic;
using System;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace SlackAPI
Expand Down
8 changes: 4 additions & 4 deletions SlackAPI.Tests/Configuration/IntegrationCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace SlackAPI.Tests.Configuration
{
[CollectionDefinition("Integration tests")]
public class IntegrationCollection : ICollectionFixture<IntegrationFixture>
{
}
[CollectionDefinition("Integration tests")]
public class IntegrationCollection : ICollectionFixture<IntegrationFixture>
{
}
}
8 changes: 4 additions & 4 deletions SlackAPI.Tests/Configuration/IntegrationFixture.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using Newtonsoft.Json;
using SlackAPI.Tests.Helpers;
using System;
using System.IO;
using System.Reflection;
using Newtonsoft.Json;
using SlackAPI.Tests.Helpers;
using Xunit;

namespace SlackAPI.Tests.Configuration
Expand Down Expand Up @@ -35,7 +35,7 @@ private SlackConfig GetConfig()
string fileName = Path.Combine(assemblyDirectory, @"configuration\config.json");
string json = System.IO.File.ReadAllText(fileName);

var jsonObject = new {slack = (SlackConfig)null };
var jsonObject = new { slack = (SlackConfig)null };
return JsonConvert.DeserializeAnonymousType(json, jsonObject).slack;
}

Expand Down
2 changes: 1 addition & 1 deletion SlackAPI.Tests/Connect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void TestGetAccessToken()

// act
var accessTokenResponse = GetAccessToken(clientId, clientSecret, "", authCode);

// assert
Assert.NotNull(accessTokenResponse);
Assert.NotNull(accessTokenResponse.bot);
Expand Down
2 changes: 1 addition & 1 deletion SlackAPI.Tests/Helpers/InSync.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Threading;
using System.Runtime.CompilerServices;
using System.Threading;
using Xunit;

namespace SlackAPI.Tests.Helpers
Expand Down
2 changes: 1 addition & 1 deletion SlackAPI.Tests/JoinDirectMessageChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void ShouldJoinDirectMessageChannel()
client.JoinDirectMessageChannel(response =>
{
actual = response;
sync.Proceed();;
sync.Proceed(); ;
}, user);
}

Expand Down
2 changes: 1 addition & 1 deletion SlackAPI.Tests/Update.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace SlackAPI.Tests
{
[Collection("Integration tests")]
public class Update
public class Update
{
private readonly IntegrationFixture fixture;

Expand Down
4 changes: 2 additions & 2 deletions SlackAPI.Tests/Users.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Linq;
using SlackAPI.Tests.Configuration;
using SlackAPI.Tests.Configuration;
using SlackAPI.Tests.Helpers;
using System.Linq;
using Xunit;

namespace SlackAPI.Tests
Expand Down
5 changes: 3 additions & 2 deletions SlackAPI/Attachment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class Attachment
public string title_link;
public string text;
public Field[] fields;

public string image_url;
public string thumb_url;
public string[] mrkdwn_in;
Expand All @@ -24,7 +24,8 @@ public class Attachment
public string footer_icon;
}

public class Field{
public class Field
{
public string title;
public string value;
public bool @short;
Expand Down
6 changes: 2 additions & 4 deletions SlackAPI/Bot.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System;

namespace SlackAPI
namespace SlackAPI
{
public class Bot
{
public string emoji;
public string emoji;
public string image_24;
public string image_32;
public string image_48;
Expand Down
8 changes: 1 addition & 7 deletions SlackAPI/Channel.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackAPI
namespace SlackAPI
{
public class Channel : Conversation
{
Expand Down
8 changes: 1 addition & 7 deletions SlackAPI/ContextMessage.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackAPI
namespace SlackAPI
{
public class ContextMessage : Message
{
Expand Down
4 changes: 0 additions & 4 deletions SlackAPI/Conversation.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackAPI
{
Expand Down
8 changes: 1 addition & 7 deletions SlackAPI/DirectMessageConversation.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackAPI
namespace SlackAPI
{
public class DirectMessageConversation : Conversation
{
Expand Down
4 changes: 2 additions & 2 deletions SlackAPI/Extensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace SlackAPI
{
Expand Down
3 changes: 0 additions & 3 deletions SlackAPI/JavascriptBotsToArray.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackAPI
{
Expand Down
8 changes: 2 additions & 6 deletions SlackAPI/JavascriptDateTimeConverter.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackAPI
{
Expand All @@ -20,8 +16,8 @@ public override object ReadJson(Newtonsoft.Json.JsonReader reader, Type objectTy
DateTime res = new DateTime(621355968000000000 + (long)(value * 10000000m)).ToLocalTime();
System.Diagnostics.Debug.Assert(
Decimal.Equals(
Decimal.Parse(res.ToProperTimeStamp()),
Decimal.Parse(reader.Value.ToString(), CultureInfo.InvariantCulture)),
Decimal.Parse(res.ToProperTimeStamp()),
Decimal.Parse(reader.Value.ToString(), CultureInfo.InvariantCulture)),
"Precision loss :(");
return res;
}
Expand Down
4 changes: 0 additions & 4 deletions SlackAPI/Message.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SlackAPI
{
Expand Down
Loading

0 comments on commit b2da5be

Please sign in to comment.