Skip to content

Commit

Permalink
Version 1.8.0 (#186)
Browse files Browse the repository at this point in the history
## Version 1.8.0
`@yext/answers-core` is now `@yext/search-core`!  This means that much of the `answers` terminology is now deprecated and have been replaced by new `search` terms.
### Changes
- The following identifiers were renamed in (#185):
  - `AnswersCore` → `SearchCore`
  - `AnswersError` → `SearchError`
  - `AnswersRequest` → `SearchRequest`
  - `AnswersConfig` → `SearchConfig`
  - `BaseAnswersConfig` →`BaseSearchConfig`
  - `AnswersConfigWithApiKey` → `SearchConfigWithApiKey`
  - `AnswersConfigWithToken` → `SearchConfigWithToken`
  - `AnswersConfigWithDefaulting` → `SearchConfigWithDefaulting`
- `ANSWERS_CORE` was _not_ replaced with `SEARCH_CORE` for `search-core` agent info.
  • Loading branch information
alextaing committed Jul 11, 2022
2 parents b63d7a1 + 7ddafd6 commit 56b97c8
Show file tree
Hide file tree
Showing 510 changed files with 3,855 additions and 3,524 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/run-linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Run Linter

on:
pull_request:
branches: [master, develop, release/*, hotfix/*]

jobs:
linting:
uses: yext/slapshot-reusable-workflows/.github/workflows/run-linting.yml@v1
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Answers Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
The Search Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
and certain functionality requires paid subscriptions to Yext products.

Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json)
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Answers Core
# Search Core


<div>
<a href="https://npmjs.org/package/@yext/answers-core">
<img src="https://img.shields.io/npm/v/@yext/answers-core" alt="NPM version"/>
<a href="https://npmjs.org/package/@yext/search-core">
<img src="https://img.shields.io/npm/v/@yext/search-core" alt="NPM version"/>
</a>
<a href="./LICENSE">
<img src="https://img.shields.io/badge/License-BSD%203--Clause-blue.svg" alt="License"/>
</a>
<a href='https://coveralls.io/github/yext/answers-core?branch=master'>
<img src='https://coveralls.io/repos/github/yext/answers-core/badge.svg?branch=master' alt='Coverage Status' />
<a href='https://coveralls.io/github/yext/search-core?branch=master'>
<img src='https://coveralls.io/repos/github/yext/search-core/badge.svg?branch=master' alt='Coverage Status' />
</a>
</div>
<br>

Answers Core is a networking library for interacting with the Yext Answers API.
Search Core is a networking library for interacting with the Yext Search API.

[Full Documentation](./docs/answers-core.md)
[Full Documentation](./docs/search-core.md)

## Features

Expand All @@ -29,18 +29,18 @@ Answers Core is a networking library for interacting with the Yext Answers API.

For a full getting started walk through, view our [official Hitchhiker Guide](https://hitchhikers.yext.com/guides/answers-core-getting-started/).

First, install Answers-core via [npm](https://www.npmjs.com/get-npm):
First, install Search-core via [npm](https://www.npmjs.com/get-npm):

```bash
npm install @yext/answers-core
npm install @yext/search-core
```

Next, import and initialize the core library in your application.

The apiKey and experienceKey will come from your Answers experience on yext.com. You can signup for a free trial at [https://www.yext.com/free-trial/](https://www.yext.com/free-trial/).
The apiKey and experienceKey will come from your Search experience on yext.com. You can signup for a free trial at [https://www.yext.com/free-trial/](https://www.yext.com/free-trial/).

```js
import { provideCore } from '@yext/answers-core';
import { provideCore } from '@yext/search-core';

const core = provideCore({
apiKey: '<your api key>',
Expand All @@ -52,15 +52,15 @@ const core = provideCore({

To use the library with Node, use the following import instead:
```js
const { provideCore } = require('@yext/answers-core');
const { provideCore } = require('@yext/search-core');
```

Now that the core is initialized, let's run a search on an "FAQs" vertical.

```js
core.verticalSearch({
verticalKey: 'FAQs',
query: 'What is Yext Answers?',
query: 'What is Yext Search?',
}).then(results => {
// Do something with the search results
}).catch(err => {
Expand All @@ -69,16 +69,16 @@ core.verticalSearch({
```

### Explanation of Builds
- The ESM (ES6) build will be used automatically by module bundlers that support it (e.g. Webpack). It can be specified directly by importing `@yext/answers-core/lib/esm`
- The CommonJS build will be used automatically by Node, but it can be specified directly by importing `@yext/answers-core/lib/commonjs`
- The Legacy (UMD) bundle should be used for supporting IE11 out of the box. It is compiled to ES5 and it contains the necessary ponyfills for IE11. If your application already contains polyfills, we recommend bundling one of the other builds in order to prevent your application from including duplicate polyfills. This bundle can be specified by importing `@yext/answers-core/legacy`
- The ESM (ES6) build will be used automatically by module bundlers that support it (e.g. Webpack). It can be specified directly by importing `@yext/search-core/lib/esm`
- The CommonJS build will be used automatically by Node, but it can be specified directly by importing `@yext/search-core/lib/commonjs`
- The Legacy (UMD) bundle should be used for supporting IE11 out of the box. It is compiled to ES5 and it contains the necessary ponyfills for IE11. If your application already contains polyfills, we recommend bundling one of the other builds in order to prevent your application from including duplicate polyfills. This bundle can be specified by importing `@yext/search-core/legacy`


And that's it! See **[our documentation](./docs/answers-core.answerscore.md)** for a full list of supported API calls.
And that's it! See **[our documentation](./docs/search-core.searchcore.md)** for a full list of supported API calls.

## License

Yext Answers-core is an open-sourced library licensed under the [BSD-3 License](./LICENSE).
Yext Search-core is an open-sourced library licensed under the [BSD-3 License](./LICENSE).

## Third Party Licenses

Expand Down
13 changes: 0 additions & 13 deletions docs/answers-core.additionalhttpheaders._client-sdk_.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/answers-core.additionalhttpheaders.md

This file was deleted.

15 changes: 0 additions & 15 deletions docs/answers-core.answersconfig.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/answers-core.answersconfigwithapikey.apikey.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/answers-core.answersconfigwithapikey.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/answers-core.answersconfigwithapikey.token.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/answers-core.answersconfigwithtoken.apikey.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/answers-core.answersconfigwithtoken.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/answers-core.answersconfigwithtoken.token.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/answers-core.answerscore._constructor_.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/answers-core.answerscore.md

This file was deleted.

28 changes: 0 additions & 28 deletions docs/answers-core.answerscore.submitquestion.md

This file was deleted.

28 changes: 0 additions & 28 deletions docs/answers-core.answerscore.universalautocomplete.md

This file was deleted.

Loading

0 comments on commit 56b97c8

Please sign in to comment.