using System.Collections.Generic;
namespace Retailcrm
{
///
/// Unversioned API Client
///
public class Connection
{
private readonly Request _request;
///
/// Unversioned API Client Constructor
///
///
///
public Connection(string url, string key)
{
if ("/" != url.Substring(url.Length - 1, 1))
{
url += "/";
}
url += "api/";
_request = new Request(url, new Dictionary { { "apiKey", key } });
}
///
/// Get available API versions
///
///
public Response Versions()
{
return _request.MakeRequest(
"api-versions",
Request.MethodGet
);
}
///
/// Get available API methods
///
///
public Response Credentials()
{
return _request.MakeRequest(
"credentials",
Request.MethodGet
);
}
}
}