Ejemplo n.º 1
0
        public async Task <HttpResponseMessage> Detect(string imageFilePath)
        {
            string uri = _uriBase + $"detect?returnFaceId=true";

            var content = _httpHelper.CreateByteArrayContent(imageFilePath, "application/octet-stream");

            var client = _httpHelper.GetHttpClient();

            return(await client.PostAsync(uri, content));
        }
Ejemplo n.º 2
0
        public async Task <HttpResponseMessage> AddFace(string personGroupId,
                                                        string personId,
                                                        string imagePath)
        {
            var content = _httpHelper.CreateByteArrayContent(imagePath, "application/octet-stream");

            string uri = _uriBase + $"persongroups/{personGroupId}/persons/{personId}/persistedFaces";

            var client = _httpHelper.GetHttpClient();

            return(await client.PostAsync(uri, content));
        }
Ejemplo n.º 3
0
        public async Task <HttpResponseMessage> Create(string personGroupId)
        {
            var personGroup = new
            {
                Name     = personGroupId,
                UserData = "Sample Data"
            };
            var content = _httpHelper.CreateHttpContent(personGroup, "application/json");

            string uri = _uriBase + $"persongroups/{ personGroupId }";

            var client = _httpHelper.GetHttpClient();

            return(await client.PutAsync(uri, content));
        }