Пример #1
0
        public async Task <UrlAssociationData> GetByKeyAsync(string key)
        {
            var response = await _urlClient.GetUrlByKeyAsync(new KeyRequest { Key = key });

            var data = new UrlAssociationData()
            {
                Key     = response.Key,
                Address = response.Address
            };

            return(data);
        }
Пример #2
0
        public async Task <UrlAssociationData> AddUrlAsync(Models.UrlRequest url)
        {
            var response = await _associationClient.AddUrlAsync(new GrpcAssociation.UrlRequest()
            {
                Address = url.Address
            });

            var data = new UrlAssociationData()
            {
                Key     = response.Key,
                Address = response.Address
            };

            return(data);
        }