How to use the @algolia/requester-common.MethodEnum.Get function in @algolia/requester-common

To help you get started, we’ve selected a few @algolia/requester-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github algolia / algoliasearch-client-javascript / packages / client-search / src / methods / client / listUserIDs.ts View on Github external
requestOptions?: ListUserIDsOptions & RequestOptions
  ): Readonly> => {
    const { page, hitsPerPage, ...options } = requestOptions || {};
    const mappedRequestOptions = createMappedRequestOptions(options);

    if (page) {
      mappedRequestOptions.queryParameters.page = page; // eslint-disable-line functional/immutable-data
    }

    if (hitsPerPage) {
      mappedRequestOptions.queryParameters.hitsPerPage = hitsPerPage; // eslint-disable-line functional/immutable-data
    }

    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: '1/clusters/mapping',
      },
      mappedRequestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-search / src / methods / client / getLogs.ts View on Github external
if (length) {
      mappedRequestOptions.queryParameters.length = length; // eslint-disable-line functional/immutable-data
    }

    if (offset) {
      mappedRequestOptions.queryParameters.offset = offset; // eslint-disable-line functional/immutable-data
    }

    if (type) {
      mappedRequestOptions.queryParameters.type = type; // eslint-disable-line functional/immutable-data
    }

    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: '1/logs',
      },
      mappedRequestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-search / src / methods / index / getObject.ts View on Github external
return (
    objectID: string,
    requestOptions?: RequestOptions & GetObjectOptions
  ): Readonly> => {
    const { attributesToRetrieve, ...options } = requestOptions || {};
    const mappedRequestOptions = createMappedRequestOptions(options);
    if (attributesToRetrieve) {
      mappedRequestOptions.queryParameters.attributesToRetrieve = attributesToRetrieve; // eslint-disable-line functional/immutable-data
    }

    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: encode('1/indexes/%s/%s', base.indexName, objectID),
      },
      mappedRequestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-search / src / methods / index / getSettings.ts View on Github external
return (requestOptions?: RequestOptions): Readonly> => {
    const mappedRequestOptions = createMappedRequestOptions(requestOptions);

    // eslint-disable-next-line functional/immutable-data
    mappedRequestOptions.queryParameters.getVersion = '2';

    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: encode('1/indexes/%s/settings', base.indexName),
      },
      mappedRequestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-search / src / methods / client / getTopUserIDs.ts View on Github external
return (requestOptions?: RequestOptions): Readonly> => {
    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: '1/clusters/mapping/top',
      },
      requestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-analytics / src / methods / getABTests.ts View on Github external
return (
    requestOptions?: RequestOptions & GetABTestsOptions
  ): Readonly> => {
    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: '2/abtests',
      },
      requestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-search / src / methods / index / getTask.ts View on Github external
return (
    taskID: number,
    requestOptions?: RequestOptions
  ): Readonly> => {
    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: encode('1/indexes/%s/task/%s', base.indexName, taskID.toString()),
      },
      requestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-search / src / methods / client / getUserID.ts View on Github external
return (userID: string, requestOptions?: RequestOptions): Readonly> => {
    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: encode('1/clusters/mapping/%s', userID),
      },
      requestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-search / src / methods / client / listClusters.ts View on Github external
return (requestOptions?: RequestOptions): Readonly> => {
    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: '1/clusters',
      },
      requestOptions
    );
  };
};
github algolia / algoliasearch-client-javascript / packages / client-recommendation / src / methods / getPersonalizationStrategy.ts View on Github external
return (
    requestOptions?: RequestOptions
  ): Readonly> => {
    return base.transporter.read(
      {
        method: MethodEnum.Get,
        path: '1/strategies/personalization',
      },
      requestOptions
    );
  };
};

@algolia/requester-common

Common interfaces for promise-based request libraries

MIT
Latest version published 5 months ago

Package Health Score

78 / 100
Full package analysis

Similar packages