Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
refactor: remove getQueryParameter (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
samouss authored and Haroenv committed Nov 18, 2019
1 parent 3eb087c commit d9dfac4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 55 deletions.
2 changes: 0 additions & 2 deletions documentation-src/metalsmith/content/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ documentation](https://www.algolia.com/doc/rest#query-an-index).
Before using those methods, be sure to check [the shortcuts](query-parameters-shortcuts).

{{> jsdoc jsdoc/helper/setQueryParameter}}
{{> jsdoc jsdoc/helper/getQueryParameter}}


### Conjunctive Facets
Expand Down Expand Up @@ -558,7 +557,6 @@ All the attributes specific to the helper are described below:
{{> jsdoc jsdoc/state/getHierarchicalRefinement}}
{{> jsdoc jsdoc/state/getNumericRefinements}}
{{> jsdoc jsdoc/state/getNumericRefinement}}
{{> jsdoc jsdoc/state/getQueryParameter}}
{{> jsdoc jsdoc/state/getRefinedDisjunctiveFacets}}
{{> jsdoc jsdoc/state/getRefinedHierarchicalFacets}}
{{> jsdoc jsdoc/state/getUnrefinedDisjunctiveFacets}}
Expand Down
14 changes: 0 additions & 14 deletions src/SearchParameters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1310,20 +1310,6 @@ SearchParameters.prototype = {

return queryParams;
},
/**
* Let the user retrieve any parameter value from the SearchParameters
* @param {string} paramName name of the parameter
* @return {any} the value of the parameter
*/
getQueryParameter: function getQueryParameter(paramName) {
if (!this.hasOwnProperty(paramName)) {
throw new Error(
"Parameter '" + paramName + "' is not an attribute of SearchParameters " +
'(http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)');
}

return this[paramName];
},
/**
* Let the user set a specific value for a given parameter. Will return the
* same instance if the parameter is invalid or if the value is the same as the
Expand Down
18 changes: 0 additions & 18 deletions src/algoliasearch.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,24 +1073,6 @@ AlgoliaSearchHelper.prototype.getTags = function() {
return this.state.tagRefinements;
};

/**
* Get a parameter of the search by its name. It is possible that a parameter is directly
* defined in the index dashboard, but it will be undefined using this method.
*
* The complete list of parameters is
* available on the
* [Algolia website](https://www.algolia.com/doc/rest#query-an-index).
* The most commonly used parameters have their own [shortcuts](#query-parameters-shortcuts)
* or benefit from higher-level APIs (all the kind of filters have their own API)
* @param {string} parameterName the parameter name
* @return {any} the parameter value
* @example
* var hitsPerPage = helper.getQueryParameter('hitsPerPage');
*/
AlgoliaSearchHelper.prototype.getQueryParameter = function(parameterName) {
return this.state.getQueryParameter(parameterName);
};

/**
* Get the list of refinements for a given attribute. This method works with
* conjunctive, disjunctive, excluding and numerical filters.
Expand Down
21 changes: 0 additions & 21 deletions test/spec/algoliasearch.helper/getQueryParameter.js

This file was deleted.

0 comments on commit d9dfac4

Please sign in to comment.