Skip to content

ryohidaka/go-connpass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-connpass

Go Reference GitHub Release codecov Go Report Card License

Go 用 connpass API v2 クライアント

インストール

go get github.com/ryohidaka/go-connpass

使用例

Important

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

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

import "github.com/ryohidaka/go-connpass"


func main() {
    // APIキーを取得
    apiKey := "<YOUR_API_KEY>"

    // クライアントを初期化
    c := connpass.NewClient(apiKey)

    // イベント一覧を取得
    events, _ := c.GetEvents()

    // イベント資料一覧を取得
    presentations, _ := c.GetEventPresentations(364)

    // グループ一覧を取得
    groups, _ := c.GetGroups()

    // ユーザー一覧を取得
    users, _ := c.GetUsers()

    // ユーザー所属グループ一覧を取得
    userGroups, _ := c.GetUserGroups("haru860")

    // ユーザー参加イベント一覧を取得
    userAttendedEvents, _ := c.GetUserAttendedEvents("haru860")

    // ユーザー発表イベント一覧を取得
    userPresenterEvents, _ := c.GetUserPresenterEvents("haru860")
}

リンク

License

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