/// <summary> /// EslClient constructor. /// Initiates service classes that can be used by the client. /// </summary> /// <param name="apiKey">The client's api key.</param> /// <param name="baseUrl">The staging or production url.</param> public EslClient (string apiKey, string baseUrl) { Asserts.NotEmptyOrNull (apiKey, "apiKey"); Asserts.NotEmptyOrNull (baseUrl, "baseUrl"); this.baseUrl = AppendServicePath (baseUrl); configureJsonSerializationSettings(); RestClient restClient = new RestClient(apiKey); packageService = new PackageService(restClient, this.baseUrl, jsonSerializerSettings); sessionService = new SessionService(apiKey, this.baseUrl); fieldSummaryService = new FieldSummaryService(new FieldSummaryApiClient(apiKey, this.baseUrl)); auditService = new AuditService(apiKey, this.baseUrl); eventNotificationService = new EventNotificationService(new EventNotificationApiClient(restClient, this.baseUrl, jsonSerializerSettings)); customFieldService = new CustomFieldService( new CustomFieldApiClient(restClient, this.baseUrl, jsonSerializerSettings) ); groupService = new GroupService(new GroupApiClient(restClient, this.baseUrl, jsonSerializerSettings)); accountService = new AccountService(new AccountApiClient(restClient, this.baseUrl, jsonSerializerSettings)); approvalService = new ApprovalService(new ApprovalApiClient(restClient, this.baseUrl, jsonSerializerSettings)); reminderService = new ReminderService(new ReminderApiClient(restClient, this.baseUrl, jsonSerializerSettings)); templateService = new TemplateService(new TemplateApiClient(restClient, this.baseUrl, jsonSerializerSettings), packageService); authenticationTokenService = new AuthenticationTokenService(restClient, this.baseUrl); attachmentRequirementService = new AttachmentRequirementService(new AttachmentRequirementApiClient(restClient, this.baseUrl, jsonSerializerSettings)); layoutService = new LayoutService(new LayoutApiClient(restClient, this.baseUrl, jsonSerializerSettings)); qrCodeService = new QRCodeService(new QRCodeApiClient(restClient, this.baseUrl, jsonSerializerSettings)); }
/// <summary> /// EslClient constructor. /// Initiates service classes that can be used by the client. /// </summary> /// <param name="apiKey">The client's api key.</param> /// <param name="baseUrl">The staging or production url.</param> public EslClient (string apiKey, string baseUrl) { Asserts.NotEmptyOrNull (apiKey, "apiKey"); Asserts.NotEmptyOrNull (baseUrl, "baseUrl"); this.baseUrl = AppendServicePath (baseUrl); RestClient restClient = new RestClient(apiKey); packageService = new PackageService (restClient, this.baseUrl); sessionService = new SessionService (apiKey, this.baseUrl); fieldSummaryService = new FieldSummaryService (apiKey, this.baseUrl); auditService = new AuditService (apiKey, this.baseUrl); eventNotificationService = new EventNotificationService(restClient, this.baseUrl); customFieldService = new CustomFieldService( restClient, this.baseUrl ); groupService = new GroupService(restClient, this.baseUrl); accountService = new AccountService(restClient, this.baseUrl); reminderService = new ReminderService(restClient, this.baseUrl); }
private void init(RestClient restClient, String apiKey) { packageService = new PackageService(restClient, this.baseUrl, jsonSerializerSettings); reportService = new ReportService(restClient, this.baseUrl, jsonSerializerSettings); systemService = new SystemService(restClient, this.baseUrl, jsonSerializerSettings); signingService = new SigningService(restClient, this.baseUrl, jsonSerializerSettings); signerVerificationService = new SignerVerificationService(restClient, this.baseUrl, jsonSerializerSettings); signatureImageService = new SignatureImageService(restClient, this.baseUrl, jsonSerializerSettings); sessionService = new SessionService(apiKey, this.baseUrl); fieldSummaryService = new FieldSummaryService(new FieldSummaryApiClient(apiKey, this.baseUrl)); auditService = new AuditService(apiKey, this.baseUrl); eventNotificationService = new EventNotificationService(new EventNotificationApiClient(restClient, this.baseUrl, jsonSerializerSettings)); customFieldService = new CustomFieldService(new CustomFieldApiClient(restClient, this.baseUrl, jsonSerializerSettings)); groupService = new GroupService(new GroupApiClient(restClient, this.baseUrl, jsonSerializerSettings)); accountService = new AccountService(new AccountApiClient(restClient, this.baseUrl, jsonSerializerSettings)); approvalService = new ApprovalService(new ApprovalApiClient(restClient, this.baseUrl, jsonSerializerSettings)); reminderService = new ReminderService(new ReminderApiClient(restClient, this.baseUrl, jsonSerializerSettings)); templateService = new TemplateService(new TemplateApiClient(restClient, this.baseUrl, jsonSerializerSettings), packageService); authenticationTokenService = new AuthenticationTokenService(restClient, this.baseUrl); attachmentRequirementService = new AttachmentRequirementService(restClient, this.baseUrl, jsonSerializerSettings); layoutService = new LayoutService(new LayoutApiClient(restClient, this.baseUrl, jsonSerializerSettings)); qrCodeService = new QRCodeService(new QRCodeApiClient(restClient, this.baseUrl, jsonSerializerSettings)); authenticationService = new AuthenticationService(this.webpageUrl); }