Example #1
0
        public string BuildUri(
            string apiKey,
            string baseURL,
            string name,
            string stringParam,
            string uriExt)
        {
            var configuration = new ClientConfiguration
            {
                ApiDataSources = Enumerable
                                 .Range(0, 1)
                                 .Select(s =>
                                         new ApiDataSource
                {
                    Name      = "Bar",
                    ApiKey    = apiKey,
                    BaseURL   = baseURL,
                    EndPoints = new[]
                    {
                        new ApiEndPoint
                        {
                            Name         = name,
                            Parameters   = stringParam.Split(','),
                            UriExtension = uriExt
                        }
                    }
                }).ToDictionary(k => k.Name, v => v)
            };

            var result = configuration.BuildUri("Bar", "Test", "R1", "R2").ToString();

            return(result);
        }