# @goshops/gs-sdk

> A JS SDK for Go Shops Personal | Personalization engine

Latest version **1.0.25** (published 2023-07-17) · 0 weekly downloads

## Install

```sh
npm install @goshops/gs-sdk
pnpm add @goshops/gs-sdk
yarn add @goshops/gs-sdk
bun add @goshops/gs-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.25 |
| Published | 2023-07-17 |
| First published | 2023-07-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 34.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | goshops |

## Links

- npm: https://www.npmjs.com/package/@goshops/gs-sdk
- npm.io page: https://npm.io/package/@goshops/gs-sdk

## Recent versions

- 1.0.25 (latest) — 2023-07-17
- 1.0.24 — 2023-07-17
- 1.0.2-3.1 — 2023-07-17
- 1.0.1-2.2 — 2023-07-17
- 1.0.1-2.1 — 2023-07-17
- 1.0.1-1.1 — 2023-07-17
- 1.0.10 — 2023-07-17
- 1.0.9 — 2023-07-17
- 1.0.8 — 2023-07-17
- 1.0.7 — 2023-07-17
- 1.0.6 — 2023-07-14
- 1.0.5 — 2023-07-14
- 1.0.4 — 2023-07-14
- 1.0.3 — 2023-07-14
- 1.0.2 — 2023-07-14
- … 2 more at https://npm.io/package/@goshops/gs-sdk/versions

## README

# Introduction

`@goshops/gs-sdk` is a JavaScript SDK that enables seamless integration with the GoShops platform.

# Installation

You can install `@goshops/gs-sdk` package via npm:

```bash
npm install --save @goshops/gs-sdk
```

Alternatively, you can include it in your project using a script tag with the CDN link:

```html
<script src="https://unpkg.com/@goshops/gs-sdk@latest"></script>
```

To specify a version change latest with the version number from https://www.npmjs.com/package/@goshops/gs-sdk?activeTab=versions

# Usage

## With npm:

You can import @goshops/gs-sdk in your JavaScript file:

```javascript
import GSSDK from '@goshops/gs-sdk';

const gsSDK = new GSSDK('your-client-id');
```

## With CDN:

If you included the SDK using the script tag, you can access the GSSDK constructor directly:

```javascript
const gsSDK = new window.GSSDK('your-client-id');
```

In both cases, you can then use the GS SDK to call various methods:

```javascript
gsSDK.login('userId')
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error(error);
  });
```

Or using async/await:


```javascript
try {
  const response = await gsSDK.login('userId');
  console.log(response);
} catch (error) {
  console.error(error);
}
```

Note: Replace 'your-client-id' with your actual client ID.

# Methods

*@goshops/gs-sdk* exposes the following methods:

* login(userId)
* logout()
* addInteraction(interaction)
* getContent(contentId)

Refer to the official API documentation for detailed information about these methods.

---
_Source: https://npm.io/package/@goshops/gs-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
