-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor structure #7
base: master
Are you sure you want to change the base?
Conversation
- created `Slack.Client` namespace - refactored all Slack classes into individual `.cs` - refactored, renamed & moved `SlackClient` class, removing `PostWebhookMessage` method - added `Authentication` class to `SlackClient`, supporting reading API token from an XML file - added `SlackRequest` class scaffold - cleaned up namespaces, removing any traces of `DynaSlack` - added `Slack.Helpers` namespace and addded `Web` class to it, which is a refactor of old `Helpers.cs` - moved Slack responses into `SlackResponse` class, from previous `Helpers.cs`
changing `SlackRequests` so it : - uses RestSharp library - follows a generic `SlackRequest` constructor - has a generic `Execute` - has a decoupled `Deserialize`
just clearing my desktop of stuff.
accidentally leaked an OAuth token as Git was still tracking keys.xml file
Bot bot { get; set; } | ||
public Bot bot { get; set; } | ||
|
||
public readonly string BaseUrl = "https://slack.com/api/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be constant
public string JsonTokenOverride { get; set; } | ||
|
||
internal RestClient restClient; | ||
#endregion | ||
|
||
/// <summary> | ||
/// Slack client constructor | ||
/// </summary> | ||
/// <param name="token">Optional OAuth token. If not supplied or invalid, posting will only be available as bots or webhooks.</param> | ||
/// <param name="webhook">Optional webhook override. If supplied, this will be used instead of OAuth webhook.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove old argument description
@@ -0,0 +1,4 @@ | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<Slack> | |||
<token>Bearer xoxp-43176652978-92379174417-214616878260-6910f9006a1700aad82d546891831fdf</token> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be tracked in git.
fixes #2
fixes #3
This PR is a major structural change and breaks backwards compatibility.
As such, this will probably bump
DynaSlack
to2.0
.Outstanding before merging :