![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@constructor-io/constructorio-client-javascript
Advanced tools
Constructor.io JavaScript client
A JavaScript client for Constructor.io. Constructor.io provides search as a service that optimizes results using artificial intelligence (including natural language processing, re-ranking to optimize for conversions, and user personalization).
This client is intended for use in a browser environment but can also be used in React Native based mobile applications. Additional information about utilization in a React Native context can be found on the Wiki. If you want a JavaScript client for server side integrations please use @constructor-io/constructorio-node
Full API documentation is available on Github Pages
This package can be installed via npm: npm i @constructor-io/constructorio-client-javascript
. Once installed, simply import or require the package into your repository.
Alternatively, a bundled version consisting of a single JavaScript file is published within the ./dist
folder on Github. This can be utilized within a browser context if hosted locally - please do not link directly to the Github hosted version.
Important: this library should only be used in a client-side context where standard HTTP request headers are populated by the client (User-Agent
, Referer
, etc.).
You can find this in your Constructor.io dashboard. Contact sales if you'd like to sign up, or support if you believe your company already has an account.
Once imported, an instance of the client can be created as follows:
const ConstructorioClient = require('@constructor-io/constructorio-client-javascript');
const constructorio = new ConstructorioClient({
apiKey: 'YOUR API KEY',
});
After instantiating an instance of the client, four modules will be exposed as properties to help retrieve data from Constructor.io: search
, browse
, autocomplete
, recommendations
and tracker
.
The search
, browse
, recommendations
and autocomplete
modules may dispatch custom events on window
with response data when a request has been completed. The event name follows the following structure: cio.client.[moduleName].[methodName].completed
. Example consuming code can be found below:
window.addEventListener('cio.client.search.getSearchResults.completed', (event) => {
// `event.detail` will be response data
}, false);
npm run lint # run lint on source code and tests
npm run test # run tests
npm run coverage # run tests and serves coverage reports from localhost:8081
npm run docs # output documentation to `./docs` directory
FAQs
Constructor.io JavaScript client
The npm package @constructor-io/constructorio-client-javascript receives a total of 0 weekly downloads. As such, @constructor-io/constructorio-client-javascript popularity was classified as not popular.
We found that @constructor-io/constructorio-client-javascript demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.