ncloud
네이버 클라우드 플랫폼 SDK입니다.
현재 최신 API 스펙 (v2)에 맞춰서 개선작업중에 있습니다.
이 저장소는 Ncloud의 Official 저장소가 아닙니다.
문의하실 내용이 있다면, 이슈에 등록해주세요.
NAVER Cloud Platform(https://www.ncloud.com/) Library for Node.js
This project is inspired from pkgcloud.
Currently, this package supports geolocation only. The other functions are unstable.
개인 블로그
Notice
This project welcomes new contributors and invites everyone to participate.
My aim is to build an open community. There are many different ways to get involved:
- Adding new features, enhancements, tests or fixing bugs
- Pull request reviews
- Release management and verification
- Documentation
People that help with the project in any of the above categories or other ways are contributors.
Installing Dependencies
$ npm install ncloud
or
$ yarn add ncloud
Creating Instance
ES5
var ncloud = ;var client = ncloud;
ES6 or above
; const client = ncloud;
Documentation
Refer to the following link
Npm Ncloud Documentation Link
Release Note
v1.0.1
- ncloud api gateway spec v2 지원
Usage Example
See following descriptions.
PaaS : Geolocation
getLocation
action Arguments
Name | Data Type | Required | Description | Default |
---|---|---|---|---|
ip | string |
required | An IP to find the its location | |
enc | string |
optional | Encoding Method (either utf8 or euckr ) |
utf8 |
ext | string |
optional | Flag for additional info (either t or f ) |
f |
Examples
const geoLocation = clientPaaS; const geolocationResponse = await geoLocation; console;// { returnCode: 0,// requestId: 'e03c4779-0740-45dc-9462-9cc0620ea597',// geoLocation: { country: 'KR', code: '3020054000', r1: '대전광역시', r2: '유성구' } }
const geoLocation = clientPaaS; const geolocationResponse = await geoLocation; console;// expected Result =>// { country: 'KR',// code: '3020054000',// r1: '대전광역시',// r2: '유성구',// r3: '구성동',// lat: 36.370724,// long: 127.3661,// net: 'Korea Advanced Institute of Science and Technology' }
Other functions are being prepared.
Others
ncloud
supports type definitions. It is readily available in typescript.