Exemple #1
0
        public BloomApiSourcesResponse Sources()
        {
            string uri = this.BaseUri + sourceUri;

            if (!String.IsNullOrEmpty(this.ApiKey))
            {
                uri += String.Format("?secret={0}", this.ApiKey);
            }

            return(BloomService.GetRequest <BloomApiSourcesResponse>(uri));
        }
Exemple #2
0
        public BloomApiSearchResponse Search(string sourceName, BloomApiSearchOptions options = null)
        {
            string uri        = String.Format(searchUri, sourceName);
            string parameters = options != null?options.ToParameters() : "";

            if (!String.IsNullOrEmpty(this.ApiKey))
            {
                parameters = String.IsNullOrEmpty(parameters) ?
                             String.Format("secret={0}", this.ApiKey) :
                             String.Format("{0}&secret={1}", parameters, this.ApiKey);
            }

            if (!String.IsNullOrEmpty(parameters))
            {
                uri += String.Format("?{0}", parameters);
            }

            return(BloomService.GetRequest <BloomApiSearchResponse>(this.BaseUri + uri));
        }
Exemple #3
0
        public BloomApiFindResponse Find(string sourceName, string id)
        {
            string uri = String.Format(findUri, sourceName, id);

            return(BloomService.GetRequest <BloomApiFindResponse>(this.BaseUri + uri));
        }