0.0.6 • Published 9 months ago

ncp-service v0.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

NCP-Service

An easy-to-use typescript wrapper for Naver Cloud Platform API. With VersionUps, API wrappers will be added and updates.

Notice )

  • This project is created in TheAngeBridge, Inc.
  • Always welcome contributions for user's Productivity

Table of Contents

Dependency

  • axios

Installation

with npm

$ npm install ncp-service

Types

Note) Introduced types are what you have to create or handle in use NCP-Client

Based on Typescript's type alias, several types for api are declared. At this step, you can only show what you will use at each usage.

Common & Authentification

// `Authentication` for Naver Cloud Platform API
type AuthKey = {
  accessKey: string
  secretKey: string
}

// `Authentication` for SMS Service
type AuthKey = {
  phone: string
  serviceId: string
}

// Common return value for all NCP api request
type ApiClientResponse<T> = {
    // not null, you can check is request successful
    isSuccess: boolean
    // if error occured, provide error references
    errorCode?: string
    errorMessage?: string
    // if request is success, provide api response as data
    data?: T
}

Client Error Types

Client Response types preprocessed by NCP Client

HTTP StatusDesc
API000Invalid URL
API001Client's axios config error
API100HTTP errors from NCP API
API101Unexpected Response
API102No Response From Server
API200Yet Unhandled error

Current Support

(SENS) SMS API v2 Cover All Services

  • Send SMS / LMS / MMS
  • Support Advertise, Reserve, Schedule
  • Lookup Message Request's status
  • Lookup Each Message's Result
  • Lookup Reserved Message
  • Cancel Reserved Message
  • Cancel Scheduled Message

Credits

License

ISC License

0.0.6

9 months ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2-A

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago