Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hkjang/sk11st
https://github.com/hkjang/sk11st
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hkjang/sk11st
- Owner: hkjang
- License: mit
- Created: 2021-03-23T05:21:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-23T05:27:50.000Z (almost 4 years ago)
- Last Synced: 2024-08-09T06:13:12.395Z (5 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sk11st API for javascript
**Javascript** sk11st API package, Support **Node.js**
## Installation
```bash
npm install --save sk11st
```## Getting Started
### with Node.js
```javascript
const sk11st = require('sk11st')```
## Authentication
```
api key
```## sk11st API
* apikey: sk11st API key
### sk11st.product.search(apikey: string, options: object = {})
호출 예 )
```javascript
const sk11st = require('sk11st');
const convert = require('xml-js');
const iconv = require('iconv-lite');var options = {
'apiCode' : 'ProductSearch',
'keyword' : '세탁기'
}
sk11st.product.search(apikey, options).then(function (res){
var decoded = iconv.decode(res.data,'EUC-KR');
var results = convert.xml2json(decoded, {compact: true, spaces: 4});
console.log(results);
});```
## Details
- http://openapi.11st.co.kr/openapi/OpenApiGuide.tmall## 전체 API
```javascript
const sk11st = {
product: {
/** 상품 검색 API */
search(apikey, options = {}) {
options.key = apikey;
options.apiCode = 'ProductSearch';
return Request.getOpen(apikey, '', options)
},
/** 상품 카테고리 검색 API */
catetorySearch(apikey, options = {}) {
options.key = apikey;
options.apiCode = 'ProductSearch';
options.option = 'Categories';
return Request.getOpen(apikey, '', options)
},
/** 상품 카테고리 정보 검색 API */
catetoryInfo(apikey, options = {}) {
options.key = apikey;
options.apiCode = 'CategoryInfo';
return Request.getOpen(apikey, '', options)
},
/** 상품 카테고리 정보 검색 API */
productImage(apikey, options = {}) {
options.key = apikey;
options.apiCode = 'ProductImage';
return Request.getOpen(apikey, '', options)
},
/** 상품 카테고리 API */
category(apikey, options = {}) {
return Request.get(apikey, '/cateservice/category', options)
},
categoryByNum(apikey, options = {}) {
return Request.get(apikey, '/cateservice/category/'+options.ctgrNm, options)
},
}
}
```## License
[MIT](https://github.com/hkjang/sk11st/blob/master/LICENSE)
Copyright 2018-2020. [hkjang](https://github.com/hkjang). All rights reserved.