Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kcsapi

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kcsapi

Kantai Collection API TypeScript types

  • 1.191214.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

KCSAPI: Kantai Collection Server API

npm GitHub issues GitHub license

Types for Kantai Collection (Phase 2) API

In brief

This library aims to help typescript developers for Kantai Colection (Kancolle) related projects. A good API typing unveils hidden pitfalls created by Mr. Tanaka / C2 Architecture, and also prevents typo bugs.

Usage

Install

npm install --save-dev kcsapi

or

yarn add --dev kcsapi

Use

// recommended
import { APIStart2GetDataResponse, APIMstMapinfo } from 'kcsapi/api_start2/getData/response'

// each API's top level interface could be imported in this way
import { APIStart2GetDataResponse } from 'kcsapi'

How are interfaces named

whole end point omitting kcsapi part will be splited by _ and /, and each part's first character will be upper cased.

Exception: api will always be API

Examples:

EndpointRequestResponse
/kcsapi/api_req_member/get_incentiveAPIReqMemberGetIncentiveRequestAPIReqMemberGetIncentiveResponse
/kcsapi/api_start2/getDataAPIStart2GetDataRequestAPIStart2GetDataResponse

Limitations

  • Important If top level shape is array, the infered interface will be of its element's shape.
  • Some API type missing due to inference failure. Corresponding json schema might be available, however.
  • Ranking / score API is removed because it is encrypted

Details

How are types generated

  1. Collect sample api data, both request and response
  2. Feed the samples into type generator, namely, quicktype
  3. Save the generated type

When types get updated

API change

In case the API shape change, old sample files will be completely replaced by new ones (if possible).

Hidden difference or not covered endpoint

A new sample file will be added, with detail description.

Anonymization of samples

Samples will be anonymized to remove sensitive data with which the provider could be identified by game service or third party. All string values are replaced by Tanaka and numbers by 0. This way API data shape is preserved and player specific information is removed.

Liccense

MIT

Keywords

FAQs

Package last updated on 14 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc