Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 2.14 KB

README.md

File metadata and controls

71 lines (49 loc) · 2.14 KB

Connpass API Adapter for Node.js

NPM Version build codecov License

Node.js向けconnpass APIクライアントライブラリ

Note

このプロジェクトは node-connpass (by @potato4d) のフォークです。

インストール

npm i connpass-v2

使用例

Important

すべてのAPIエンドポイントでは、APIキーによる認証が必須です。

APIキーの発行にはヘルプページでの利用申請が必要です。

import { Connpass } from 'connpass-v2'

async function run() {
  // 初期化
  const apiKey = '<YOUR_API_KEY>'
  const client = new Connpass(apiKey)

  // イベント一覧取得
  const { events } = await client.getEvents()

  // イベント資料一覧取得
  const { presentations } = await client.getEventPresentations('<EVENT_ID>')

  // グループ一覧取得
  const { groups } = await client.getGropus({
    subdomain: ['bpstudy', 'beproud'],
  })

  // ユーザー一覧取得
  const { users } = await client.getUsers({
    nickname: ['haru860', 'ian'],
  })

  // ユーザー所属グループ一覧取得
  const { groups } = await client.getUserGroups('haru860')

  // ユーザー参加イベント一覧取得
  const { events } = await client.getUserAttendedEvents('haru860')

  // ユーザー発表イベント一覧取得
  const { events } = await client.getUserPresenterEvents('haru860')
}

型定義

See here.

リンク

License

This project is licensed under the MIT License - see the LICENSE file for details.