コード例 #1
0
        /// <inheritdoc />
        public async Task <LogResponse> GetLogsAsync(RequestOptions requestOptions = null,
                                                     CancellationToken ct          = default, int offset = 0, int length = 10)
        {
            var queryParams = new Dictionary <string, string>
            {
                { "offset", offset.ToString() }, { "length", length.ToString() }
            };

            requestOptions = requestOptions.AddQueryParams(queryParams);

            return(await _transport.ExecuteRequestAsync <LogResponse>(HttpMethod.Get, "/1/logs", CallType.Read,
                                                                      requestOptions, ct)
                   .ConfigureAwait(false));
        }
コード例 #2
0
        /// <inheritdoc />
        public async Task <ListUserIdsResponse> ListUserIdsAsync(int page = 0, int hitsPerPage = 1000,
                                                                 RequestOptions requestOptions = null, CancellationToken ct = default)
        {
            var queryParams = new Dictionary <string, string>
            {
                { "page", page.ToString() }, { "hitsPerPage", hitsPerPage.ToString() }
            };

            requestOptions = requestOptions.AddQueryParams(queryParams);

            return(await _transport.ExecuteRequestAsync <ListUserIdsResponse>(
                       HttpMethod.Get, "/1/clusters/mapping", CallType.Read, requestOptions, ct)
                   .ConfigureAwait(false));
        }
コード例 #3
0
        /// <inheritdoc />
        public async Task <HasPendingMappingsResponse> HasPendingMappingsAsync(bool retrieveMappings         = false,
                                                                               RequestOptions requestOptions = null, CancellationToken ct = default)
        {
            requestOptions = requestOptions.AddQueryParams(
                new Dictionary <string, string> {
                { "getClusters", retrieveMappings.ToString().ToLower() }
            });

            return(await _transport.ExecuteRequestAsync <HasPendingMappingsResponse>(
                       HttpMethod.Get,
                       "/1/clusters/mapping/pending",
                       CallType.Read, requestOptions, ct)
                   .ConfigureAwait(false));
        }
コード例 #4
0
        /// <inheritdoc />
        public async Task <ABTestsResponse> GetABTestsAsync(int offset = 0, int limit = 10,
                                                            RequestOptions requestOptions = null, CancellationToken ct = default)
        {
            var queryParams = new Dictionary <string, string>
            {
                { "offset", offset.ToString() }, { "limit", limit.ToString() }
            };

            requestOptions = requestOptions.AddQueryParams(queryParams);

            return(await _transport.ExecuteRequestAsync <ABTestsResponse>(HttpMethod.Get,
                                                                          "/2/abtests", CallType.Read, requestOptions, ct)
                   .ConfigureAwait(false));
        }