gogo-ai-site-search
Version:
A plugin for Angular and Vue that integrates GOGO Get AI Site Search.
115 lines (77 loc) • 2.42 kB
Markdown
A plugin for Angular and Vue that integrates GOGO GET AI Site Search into your application.
- [Installation](
- [Usage](
- [Angular](
- [Vue](
- [API](
- [Example](
- [License](
- [Support](
Install the plugin via npm or Yarn:
```bash
npm install gogo-ai-site-search
```
```bash
yarn add gogo-ai-site-search
```
Import and use the plugin in your component or main module:
```typescript
import { Component, OnInit } from '@angular/core';
import GOGOAISearchPlugin from 'gogo-ai-site-search';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
})
export class AppComponent implements OnInit {
ngOnInit() {
GOGOAISearchPlugin('your-api-key');
}
}
```
Import and use the plugin in your Vue component:
```vue
<template>
<div id="app">
<!-- Your app content -->
</div>
</template>
<script>
import GOGOAISearchPlugin from 'gogo-ai-site-search';
export default {
name: 'App',
mounted() {
GOGOAISearchPlugin('your-api-key');
},
};
</script>
```
Initializes the GOGO GET AI Site Search plugin.
- **`apiKey`** `(string, required)`: Your GOGO GET AI Site Search API key.
- The `GOGOAISearchPlugin` function injects the necessary elements into your application to enable GOGO GET AI Site Search.
- It creates a `div` element with the `id` of `"root"` and sets a `data-api-key` attribute with your provided API key.
- It appends a script tag to load the GOGO GET AI Site Search script from `https://gogostorage.blob.core.windows.net/search-plugin-snippet/main.js`.
```javascript
// For both Angular and Vue
import GOGOAISearchPlugin from 'gogo-ai-site-search';
// Initialize the plugin with your API key
GOGOAISearchPlugin('your-api-key');
```
**Note:** Replace `'your-api-key'` with the actual API key provided to you by GOGO AI Site Search.
To get an API key, please visit [https://gogoget.ai/](https://gogoget.ai/), sign up, subscribe, scan your site, build a search plugin, and then retrieve the plugin key.
MIT License © [GOGOKC](mailto:support@gogokc.com)
For any questions or issues, please contact [support@gogokc.com](mailto:support@gogokc.com).