-
Notifications
You must be signed in to change notification settings - Fork 16
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
Added Groups functionality #13
Open
dovetail-tech-user
wants to merge
8
commits into
esendex:master
Choose a base branch
from
dovetail-tech-user:AddedGroupsFunctionality
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b573fb8
Added Groups functionality. Add/Delete Groups. Get Contacts from with…
9836136
Remove GUIDs from Test AddContactToGroup
6096d37
Merge branch 'master' of https://github.com/esendex/esendex-dotnet-sdk
ec01517
Updated the csproj file from the master
91abb7d
Rebase/Merge Hell added back in groups
2ddde03
Added back in missing CS files after rebase/merge and updated the mis…
eb0b4a1
Added back in more files that were still missing
859a8b8
Merge branch 'master' into AddedGroupsFunctionality
dovetail-tech-user File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
using System; | ||
|
||
namespace com.esendex.sdk | ||
{ | ||
internal static class Constants | ||
{ | ||
internal const string API_NAMESPACE = "http://api.esendex.com/ns/"; | ||
|
||
internal static Uri api_uri; | ||
|
||
internal static Uri API_URI | ||
{ | ||
get { return api_uri ?? (api_uri = new UriBuilder("https", "api.esendex.com").Uri); } | ||
} | ||
|
||
internal static string JSON_MEDIA_TYPE = "application/json; charset=utf-8"; | ||
} | ||
using System; | ||
namespace com.esendex.sdk | ||
{ | ||
internal static class Constants | ||
{ | ||
internal const string API_NAMESPACE = "http://api.esendex.com/ns/"; | ||
internal static Uri api_uri; | ||
internal static Uri API_URI | ||
{ | ||
get { return api_uri ?? (api_uri = new UriBuilder("https", "api.esendex.com").Uri); } | ||
} | ||
internal static string JSON_MEDIA_TYPE = "application/json; charset=utf-8"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,114 +1,114 @@ | ||
using System; | ||
using System.Net; | ||
using System.Text; | ||
|
||
namespace com.esendex.sdk | ||
{ | ||
/// <summary> | ||
/// Represents authentication details required to access Esendex services. | ||
/// </summary> | ||
[Serializable] | ||
public class EsendexCredentials | ||
{ | ||
internal EsendexCredentials() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initialises a new instance of the com.esendex.sdk.EsendexCredentials | ||
/// </summary> | ||
/// <param name="username">Your Esendex username.</param> | ||
/// <param name="password">Your Esendex password.</param> | ||
/// <exception cref="System.ArgumentNullException"></exception> | ||
public EsendexCredentials(string username, string password) | ||
{ | ||
if (string.IsNullOrEmpty(username)) throw new ArgumentNullException("username"); | ||
if (string.IsNullOrEmpty(password)) throw new ArgumentNullException("password"); | ||
|
||
Username = username; | ||
Password = password; | ||
} | ||
|
||
/// <summary> | ||
/// Initialises a new instance of the com.esendex.sdk.EsendexCredentials | ||
/// </summary> | ||
/// <param name="sessionId">A System.Guid instance containing the session id.</param> | ||
public EsendexCredentials(Guid sessionId) | ||
{ | ||
SessionId = sessionId; | ||
} | ||
|
||
/// <summary> | ||
/// Initialises a new instance of the com.esendex.sdk.EsendexCredentials | ||
/// </summary> | ||
/// <param name="sessionId">A System.Guid instance containing the session id.</param> | ||
/// <param name="proxy">A System.Net.WebProxy instance that contains proxy information required by the local network.</param> | ||
/// <exception cref="System.ArgumentNullException"></exception> | ||
public EsendexCredentials(Guid sessionId, IWebProxy proxy) | ||
: this(sessionId) | ||
{ | ||
SetProxy(proxy); | ||
} | ||
|
||
/// <summary> | ||
/// Initialises a new instance of the com.esendex.sdk.EsendexCredentials | ||
/// </summary> | ||
/// <param name="username">A System.String instance that contains the Esendex username.</param> | ||
/// <param name="password">A System.String instance that contains the Esendex password.</param> | ||
/// <param name="proxy">A System.Net.WebProxy instance that contains proxy information required by the local network.</param> | ||
/// <exception cref="System.ArgumentNullException"></exception> | ||
public EsendexCredentials(string username, string password, IWebProxy proxy) | ||
: this(username, password) | ||
{ | ||
SetProxy(proxy); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the Esendex username. | ||
/// </summary> | ||
public string Username { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets the Esendex password. | ||
/// </summary> | ||
public string Password { get; private set; } | ||
|
||
/// <summary> | ||
/// Gets the proxy information. | ||
/// </summary> | ||
public IWebProxy WebProxy { get; private set; } | ||
|
||
/// <summary> | ||
/// Returns true if a System.Net.WebProxy instance was supplied to the constructor; otherwise, false. | ||
/// </summary> | ||
public bool UseProxy | ||
{ | ||
get { return WebProxy != null; } | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if a System.Guid instance was supplied to the constructor; otherwise, false. | ||
/// </summary> | ||
public bool UseSessionAuthentication | ||
{ | ||
get { return SessionId.HasValue; } | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a System.Guid instance containing the session id. | ||
/// </summary> | ||
public Guid? SessionId { get; set; } | ||
|
||
private void SetProxy(IWebProxy proxy) | ||
{ | ||
if (proxy == null) throw new ArgumentNullException("proxy"); | ||
|
||
WebProxy = proxy; | ||
} | ||
|
||
internal string EncodedValue() | ||
{ | ||
return Convert.ToBase64String(Encoding.UTF8.GetBytes(UseSessionAuthentication ? SessionId.Value.ToString() : Username + ":" + Password)); | ||
} | ||
} | ||
using System; | ||
using System.Net; | ||
using System.Text; | ||
namespace com.esendex.sdk | ||
{ | ||
/// <summary> | ||
/// Represents authentication details required to access Esendex services. | ||
/// </summary> | ||
[Serializable] | ||
public class EsendexCredentials | ||
{ | ||
internal EsendexCredentials() | ||
{ | ||
} | ||
/// <summary> | ||
/// Initialises a new instance of the com.esendex.sdk.EsendexCredentials | ||
/// </summary> | ||
/// <param name="username">Your Esendex username.</param> | ||
/// <param name="password">Your Esendex password.</param> | ||
/// <exception cref="System.ArgumentNullException"></exception> | ||
public EsendexCredentials(string username, string password) | ||
{ | ||
if (string.IsNullOrEmpty(username)) throw new ArgumentNullException("username"); | ||
if (string.IsNullOrEmpty(password)) throw new ArgumentNullException("password"); | ||
Username = username; | ||
Password = password; | ||
} | ||
/// <summary> | ||
/// Initialises a new instance of the com.esendex.sdk.EsendexCredentials | ||
/// </summary> | ||
/// <param name="sessionId">A System.Guid instance containing the session id.</param> | ||
public EsendexCredentials(Guid sessionId) | ||
{ | ||
SessionId = sessionId; | ||
} | ||
/// <summary> | ||
/// Initialises a new instance of the com.esendex.sdk.EsendexCredentials | ||
/// </summary> | ||
/// <param name="sessionId">A System.Guid instance containing the session id.</param> | ||
/// <param name="proxy">A System.Net.WebProxy instance that contains proxy information required by the local network.</param> | ||
/// <exception cref="System.ArgumentNullException"></exception> | ||
public EsendexCredentials(Guid sessionId, IWebProxy proxy) | ||
: this(sessionId) | ||
{ | ||
SetProxy(proxy); | ||
} | ||
/// <summary> | ||
/// Initialises a new instance of the com.esendex.sdk.EsendexCredentials | ||
/// </summary> | ||
/// <param name="username">A System.String instance that contains the Esendex username.</param> | ||
/// <param name="password">A System.String instance that contains the Esendex password.</param> | ||
/// <param name="proxy">A System.Net.WebProxy instance that contains proxy information required by the local network.</param> | ||
/// <exception cref="System.ArgumentNullException"></exception> | ||
public EsendexCredentials(string username, string password, IWebProxy proxy) | ||
: this(username, password) | ||
{ | ||
SetProxy(proxy); | ||
} | ||
/// <summary> | ||
/// Gets the Esendex username. | ||
/// </summary> | ||
public string Username { get; private set; } | ||
/// <summary> | ||
/// Gets the Esendex password. | ||
/// </summary> | ||
public string Password { get; private set; } | ||
/// <summary> | ||
/// Gets the proxy information. | ||
/// </summary> | ||
public IWebProxy WebProxy { get; private set; } | ||
/// <summary> | ||
/// Returns true if a System.Net.WebProxy instance was supplied to the constructor; otherwise, false. | ||
/// </summary> | ||
public bool UseProxy | ||
{ | ||
get { return WebProxy != null; } | ||
} | ||
/// <summary> | ||
/// Returns true if a System.Guid instance was supplied to the constructor; otherwise, false. | ||
/// </summary> | ||
public bool UseSessionAuthentication | ||
{ | ||
get { return SessionId.HasValue; } | ||
} | ||
/// <summary> | ||
/// Gets or sets a System.Guid instance containing the session id. | ||
/// </summary> | ||
public Guid? SessionId { get; set; } | ||
private void SetProxy(IWebProxy proxy) | ||
{ | ||
if (proxy == null) throw new ArgumentNullException("proxy"); | ||
WebProxy = proxy; | ||
} | ||
internal string EncodedValue() | ||
{ | ||
return Convert.ToBase64String(Encoding.UTF8.GetBytes(UseSessionAuthentication ? SessionId.Value.ToString() : Username + ":" + Password)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 can be inlined with the contact creation.