Пример #1
0
        public void CreateEvent()
        {
            IamConfig config = new IamConfig(
                apikey: apikey
                );

            DiscoveryService service = new DiscoveryService(versionDate, config);

            service.SetEndpoint(url);

            var data = new EventData()
            {
                EnvironmentId = environmentId,
                SessionToken  = sessionToken,
                CollectionId  = collectionId,
                DocumentId    = documentId
            };

            var result = service.CreateEvent(
                type: CreateEventResponse.TypeEnumValue.CLICK,
                data: data
                );

            Console.WriteLine(result.Response);
        }
Пример #2
0
        public void CreateEvent()
        {
            TokenOptions tokenOptions = new TokenOptions()
            {
                IamApiKey  = apikey,
                ServiceUrl = url
            };

            DiscoveryService service = new DiscoveryService(tokenOptions, versionDate);

            var data = new EventData()
            {
                EnvironmentId = environmentId,
                SessionToken  = sessionToken,
                CollectionId  = collectionId,
                DocumentId    = documentId
            };

            var result = service.CreateEvent(
                type: CreateEventResponse.TypeEnumValue.CLICK,
                data: data
                );

            Console.WriteLine(result.Response);
        }
        public void CreateEvent()
        {
            IamAuthenticator authenticator = new IamAuthenticator(
                apikey: "{apikey}");

            DiscoveryService service = new DiscoveryService("2019-04-30", authenticator);

            service.SetServiceUrl("{serviceUrl}");

            var data = new EventData()
            {
                EnvironmentId = "{environmentId}",
                SessionToken  = "{sessionToken}",
                CollectionId  = "{collectionId}",
                DocumentId    = "{documentId}"
            };

            var result = service.CreateEvent(
                type: CreateEventResponse.TypeEnumValue.CLICK,
                data: data
                );

            Console.WriteLine(result.Response);
        }