Skip to content

Comments

feat: add getSpaceStatistics api#69

Merged
nameless-mc merged 2 commits intomasterfrom
feat/add-get-spaces-statistics-api
Nov 26, 2025
Merged

feat: add getSpaceStatistics api#69
nameless-mc merged 2 commits intomasterfrom
feat/add-get-spaces-statistics-api

Conversation

@nameless-mc
Copy link
Contributor

Why

2024年8月20日のkintone APIアップデートで追加された「スペースの使用状況を取得する」API (/k/v1/spaces/statistics.json) をJava Clientに実装するため。

API仕様: https://cybozu.dev/ja/kintone/docs/rest-api/spaces/get-spaces-statistics/

What

  • SpaceClientgetStatistics()メソッドを追加
  • リクエストクラス GetSpacesStatisticsRequest を追加(offset, limitパラメータをサポート)
  • レスポンスクラス GetSpacesStatisticsResponseBody を追加
  • モデルクラス SpaceStatistics を追加(スペースの使用状況情報を保持)
  • KintoneApiGET_SPACES_STATISTICS定義を追加
  • ユニットテストを追加

主な変更内容

追加ファイル

  • src/main/java/com/kintone/client/model/space/SpaceStatistics.java
  • src/main/java/com/kintone/client/api/space/GetSpacesStatisticsRequest.java
  • src/main/java/com/kintone/client/api/space/GetSpacesStatisticsResponseBody.java

変更ファイル

  • src/main/java/com/kintone/client/KintoneApi.java - API定義追加
  • src/main/java/com/kintone/client/SpaceClient.java - getStatistics()メソッド追加
  • src/test/java/com/kintone/client/SpaceClientTest.java - テストケース追加

@nameless-mc nameless-mc self-assigned this Nov 12, 2025
Copilot AI review requested due to automatic review settings November 12, 2025 06:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements support for the "Get Spaces Statistics" API endpoint (/k/v1/spaces/statistics.json) that was added to kintone on August 20, 2024. The implementation adds the ability to retrieve space usage statistics with pagination support.

  • Adds getStatistics() methods to SpaceClient for retrieving space usage statistics
  • Implements request/response model classes with offset and limit pagination parameters
  • Includes comprehensive unit tests for the new functionality

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
SpaceStatistics.java New model class representing space usage statistics with fields for ID, name, counts, privacy settings, and audit information
GetSpacesStatisticsRequest.java New request class supporting optional offset and limit parameters for pagination
GetSpacesStatisticsResponseBody.java New response class containing a list of space statistics
SpaceClient.java Adds two getStatistics() method overloads following the existing pattern of parameterless and parameterized variants
KintoneApi.java Adds GET_SPACES_STATISTICS API endpoint definition
SpaceClientTest.java Adds unit tests for both getStatistics() method variants

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

private final User creator;

/** The created date time of the Space. */
private final String createdAt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZonedDateTimeが適切?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ecdd50d で対応

private final User modifier;

/** The updated date time of the Space. */
private final String modifiedAt;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZonedDateTimeが適切?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ecdd50d で対応

@nameless-mc nameless-mc merged commit 449be44 into master Nov 26, 2025
2 checks passed
@nameless-mc nameless-mc deleted the feat/add-get-spaces-statistics-api branch November 26, 2025 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants