Пример #1
0
        public async Task Test_GetLsm()
        {
            var api     = new ReceptivitiClient(API_KEY, API_SECRET_KEY);
            var person1 = (Person)await api.CreatePerson(new CreatePersonRequest()
            {
                Handle = Guid.NewGuid().ToString(),
                Name   = "Test Person 1",
                Gender = Gender.Male,
                Tags   = new string[] { "tag1", "tag2" },
            });

            var person2 = (Person)await api.CreatePerson(new CreatePersonRequest()
            {
                Handle = Guid.NewGuid().ToString(),
                Name   = "Test Person 2",
                Gender = Gender.Male,
                Tags   = new string[] { "tag1", "tag2" },
            });

            var sample1 = await api.CreatePersonContent(person1.Id, new ContentRequest()
            {
                Source      = ContentSource.ProfessionalCorrespondence,
                Content     = "hello this is a test",
                RecipientId = person2.Id,
            });

            var sample2 = await api.CreatePersonContent(person2.Id, new ContentRequest()
            {
                Source      = ContentSource.ProfessionalCorrespondence,
                Content     = "hello this is a test",
                RecipientId = person1.Id,
            });

            person1 = await api.GetPerson(person1.Id);

            person2 = await api.GetPerson(person2.Id);

            var lsm = await api.GetLsmScore(person1.Id, person2.Id);
        }
Пример #2
0
        public async Task Test_PostPerson()
        {
            var api    = new ReceptivitiClient(API_KEY, API_SECRET_KEY);
            var rid    = Guid.NewGuid().ToString();
            var person = await api.CreatePerson(new CreatePersonRequest()
            {
                Handle = rid,
                Name   = "Test Person",
                Gender = Gender.Male,
                Tags   = new string[] { "tag1", "tag2" },
            });

            Assert.AreEqual(rid, person.Handle);
            Assert.AreEqual("Test Person", person.Name);
            Assert.AreEqual(Gender.Male, person.Gender);
            Assert.AreEqual(2, person.Tags.Length);
        }