/// <summary> /// RamBase API Client /// </summary> /// <param name="clientId">RamBase client id</param> /// <param name="clientSecret">RamBase client secret</param> /// <param name="defaultTimeout">Default HTTP request timeout</param> /// <param name="defaultPath">Default API path</param> public RamBaseApi(string clientId, string clientSecret, int defaultTimeout = _timeout, string defaultPath = "https://api.rambase.net") { ClientId = clientId; ClientSecret = clientSecret; ApiPath = defaultPath; if (!defaultPath.EndsWith("/")) { ApiPath += "/"; } _httpClient = new HttpClient(); _httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); _httpClient.Timeout = TimeSpan.FromMilliseconds(defaultTimeout); _httpClient.BaseAddress = new Uri(defaultPath); _authentication = new RamBaseAuthentication(_httpClient); _request = new RamBaseRequest(_httpClient); _operations = new RamBaseOperations(_request); _access = new RamBaseAccess(_request); _domainValues = new RamBaseDomainValues(_request); _metadata = new RamBaseMetadata(_request); _sessions = new RamBaseSessions(_request); }
public RamBaseSessions(RamBaseRequest request) { _request = request; }
public RamBaseOperations(RamBaseRequest request) { _request = request; }
public RamBaseAccess(RamBaseRequest ramBaseRequest) { _request = ramBaseRequest; }
public RamBaseDomainValues(RamBaseRequest ramBaseRequest) { _request = ramBaseRequest; }
public RamBaseMetadata(RamBaseRequest request) { _request = request; }