1.1.4 • Published 4 years ago

ncloud v1.1.4

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

ncloud

npm.io GitHub license

NPM

npm.io

네이버 클라우드 플랫폼 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.

개인 블로그

https://mosfet1kg.github.io/

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 = require('ncloud');
var client = ncloud.createClient({
        accessKey: "$ACCESS_KEY_ID$",
        secretKey: "$SECRET_KEY$",
});

ES6 or above

import * as ncloud from 'ncloud';

const client = ncloud.createClient({
     accessKey: "$ACCESS_KEY_ID$",
     secretKey: "$SECRET_KEY$",
});

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

action getLocation

Arguments

NameData TypeRequiredDescriptionDefault
ipstringrequiredAn IP to find the its location
encstringoptionalEncoding Method (either utf8 or euckr)utf8
extstringoptionalFlag for additional info (either t or f)f

Examples

const geoLocation = client.PaaS.geoLocation();

const geolocationResponse = await geoLocation.geoLocation({
  ip: '143.248.142.77'
});

console.log(geolocationResponse);
//  { returnCode: 0,
//   requestId: 'e03c4779-0740-45dc-9462-9cc0620ea597',
//   geoLocation: { country: 'KR', code: '3020054000', r1: '대전광역시', r2: '유성구' } }
const geoLocation = client.PaaS.geoLocation();

const geolocationResponse = await geoLocation.geoLocation({
  ip: '143.248.142.77',
  ext: 't'
});

console.log(geolocationResponse);
// 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.

1.1.4

4 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.1.39

7 years ago

0.1.38

7 years ago

0.1.37

7 years ago

0.1.36

7 years ago

0.1.35

7 years ago

0.1.34

7 years ago

0.1.33

7 years ago

0.1.32

7 years ago

0.1.31

7 years ago

0.1.30

7 years ago

0.1.29

7 years ago

0.1.28

7 years ago

0.1.27

7 years ago

0.1.26

7 years ago

0.1.25

7 years ago

0.1.24

7 years ago

0.1.23

7 years ago

0.1.22

7 years ago

0.1.21

7 years ago

0.1.20

7 years ago

0.1.19

7 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago