Skip to content

Commit

Permalink
chore!: rename package name from '@hendt/ebay-api' to 'ebay-api'
Browse files Browse the repository at this point in the history
  • Loading branch information
dantio committed Feb 8, 2022
1 parent 6962231 commit fa61e14
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ It supports `client credentials grant` and `authorization code grant` \(Auth'N'A
## Install

```bash
npm install @hendt/ebay-api
yarn add @hendt/ebay-api
npm install ebay-api
yarn add ebay-api
```

## 🚀 Usage & Quick start
Expand All @@ -55,9 +55,9 @@ Checkout API [examples](https://github.com/hendt/ebay-api/tree/master/examples).
### NodeJS

```javascript
import eBayApi from '@hendt/ebay-api';
import eBayApi from 'ebay-api';
// or:
// const eBayApi = require('@hendt/ebay-api')
// const eBayApi = require('ebay-api')

const eBay = new eBayApi({
appId: '-- also called Client ID --',
Expand All @@ -71,7 +71,7 @@ console.log(JSON.stringify(item, null, 2));

#### Detailed configuration example
```javascript
import eBayApi from '@hendt/ebay-api';
import eBayApi from 'ebay-api';

const eBay = new eBayApi({
appId: '-- also called Client ID --',
Expand Down Expand Up @@ -102,7 +102,7 @@ Or use [https://github.com/Rob--W/cors-anywhere](CORS Anywhere is a NodeJS proxy


```html
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@hendt/ebay-api@latest/lib/ebay-api.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ebay-api@latest/lib/ebay-api.min.js"></script>
<script>
const eBay = new eBayApi({
appId: 'appId',
Expand Down Expand Up @@ -192,7 +192,7 @@ You can also generate the token on eBay developer page and use it directly (see
[eBay Docs](https://developer.ebay.com/api-docs/static/oauth-auth-code-grant-request.html)

```javascript
import eBayApi from '@hendt/ebay-api';
import eBayApi from 'ebay-api';

// 1. Create new eBayApi instance and set the scope.
const eBay = eBayApi.fromEnv();
Expand All @@ -215,7 +215,7 @@ After you granted success, eBay will redirect you to your 'Auth accepted URL' an
This is how it would look like if you use `express`:

```javascript
import eBayApi from '@hendt/ebay-api';
import eBayApi from 'ebay-api';

app.get('/success', async function(req, res) {
// 3. Get the parameter code that is placed as query parameter in redirected page
Expand All @@ -241,7 +241,7 @@ app.get('/success', async function(req, res) {
If token is already in session:

```js
import eBayApi from '@hendt/ebay-api';
import eBayApi from 'ebay-api';

app.get('/orders/:id', async function(req, res) {
const id = req.params.id;
Expand Down Expand Up @@ -357,7 +357,7 @@ eBay.trading.AddFixedPriceItem({

### Low level: use the Axios interceptor to manipulate the request
```javascript
import eBayApi from '@hendt/ebay-api';
import eBayApi from 'ebay-api';
const eBay = new eBayApi(/* { your config here } */);

eBay.req.instance.interceptors.request.use((request) => {
Expand All @@ -375,7 +375,7 @@ npm install zlib # or yarn add zlib
```

```javascript
import eBayApi from '@hendt/ebay-api';
import eBayApi from 'ebay-api';
import zlib from 'zlib';

const toString = (data) => new Promise((resolve) => {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</head>
<body>
<!-- script type="text/javascript" src="./lib/ebay-api.min.js"></script -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@hendt/ebay-api@latest/lib/ebay-api.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ebay-api@latest/lib/ebay-api.min.js"></script>
<link rel="stylesheet"
href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/styles/default.min.css">
<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.1/build/highlight.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@hendt/ebay-api",
"name": "ebay-api",
"author": "Daniil Tomilow",
"version": "5.3.1",
"description": "eBay TypeScript/JavaScript API for Node and Browser",
Expand Down

0 comments on commit fa61e14

Please sign in to comment.