Skip to content

Commit 3504656

Browse files
Final documentation improvements and version bump to 0.5.0
Co-authored-by: orestesgaolin <16854239+orestesgaolin@users.noreply.github.com>
1 parent 5d8f5e5 commit 3504656

3 files changed

Lines changed: 43 additions & 3 deletions

File tree

codemagic_manager/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## [0.5.0] - Complete API endpoints implementation
2+
3+
- **NEW**: Added support for all missing Codemagic API endpoints
4+
- **NEW**: Applications API - `getApplications()` to list all applications
5+
- **NEW**: Builds API - `getBuild(id)` and `getBuildsForApplication(appId)` for detailed build queries
6+
- **NEW**: Artifacts API - `getArtifacts(buildId)` and `getArtifact(id)` for build artifact management
7+
- **NEW**: Caches API - `getCaches()`, `getCache(id)`, and `deleteCache(id)` for cache management
8+
- **NEW**: Teams API - `getTeams()`, `getTeam(id)`, and `getTeamMembers(teamId)` for team management
9+
- **NEW**: Enhanced example application with tabbed interface showcasing all new functionality
10+
- **NEW**: Comprehensive test coverage for all new endpoints
11+
- **IMPROVED**: Enhanced documentation for existing methods (`getBuilds`, `getApplication`, `startBuild`)
12+
- **NEW**: Added proper model classes: `Applications`, `Artifacts`, `Cache`, `Team`, `TeamMember`, etc.
13+
- **NEW**: All models use json_serializable for consistent serialization
14+
115
## [0.4.0] - Dart SDK 3.0.0 and null safety
216

317
- Updated dependencies

codemagic_manager/lib/src/codemagic_client.dart

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ class CodemagicClient {
2323
}) : _client = HttpClient();
2424

2525
/// Retrieves [Builds] object containing list of [Application]s and [Build]s
26+
///
27+
/// This endpoint returns a paginated list of recent builds along with their
28+
/// associated applications. The response includes build status, timing information,
29+
/// and artifact details.
30+
///
31+
/// Returns [ApiResponse] containing [Builds] data on success, or error information
32+
/// on failure (e.g., 401 for invalid authentication).
2633
Future<ApiResponse<Builds>> getBuilds() async {
2734
try {
2835
final request = await _client.getUrl(Uri.parse("$apiUrl/builds"));
@@ -73,6 +80,15 @@ class CodemagicClient {
7380
}
7481

7582
/// Retrieves information about specific [Application] by its [id]
83+
///
84+
/// Fetches detailed information about a single application including its
85+
/// configuration, workflow definitions, repository settings, and metadata.
86+
///
87+
/// Parameters:
88+
/// - [id]: The unique identifier of the application
89+
///
90+
/// Returns [ApiResponse] containing [Application] data on success, or error
91+
/// information on failure (e.g., 404 if application not found).
7692
Future<ApiResponse<Application>> getApplication(String id) async {
7793
try {
7894
final request = await _client.getUrl(Uri.parse("$apiUrl/apps/$id"));
@@ -138,8 +154,18 @@ class CodemagicClient {
138154
}
139155
}
140156

141-
/// Starts new build for [Application] by its [appId], [workflowId]
142-
/// and [branch]
157+
/// Starts new build for [Application] by its [appId], [workflowId] and [branch]
158+
///
159+
/// Triggers a new build for the specified application using the given workflow
160+
/// and source branch. The build will be queued and executed asynchronously.
161+
///
162+
/// Parameters:
163+
/// - [appId]: The unique identifier of the application
164+
/// - [workflowId]: The workflow identifier to use for the build
165+
/// - [branch]: The source branch name to build from
166+
///
167+
/// Returns [ApiResponse] containing [BuildResponse] with the new build ID on
168+
/// success, or error information on failure (e.g., 400 for invalid parameters).
143169
Future<ApiResponse<BuildResponse>> startBuild(
144170
String appId,
145171
String workflowId,

codemagic_manager/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: codemagic_manager
22
description: Package allowing to query Codemagic builds and applications from
33
the recently exposed API
4-
version: 0.4.0
4+
version: 0.5.0
55
homepage: https://roszkowski.dev
66
issue_tracker: https://github.com/orestesgaolin/codemagic_manager/issues
77
repository: https://github.com/orestesgaolin/codemagic_manager

0 commit comments

Comments
 (0)