{"id":17163290,"url":"https://github.com/noppefoxwolf/bitrise-swift","last_synced_at":"2025-04-13T14:42:34.262Z","repository":{"id":72999389,"uuid":"217667548","full_name":"noppefoxwolf/Bitrise-Swift","owner":"noppefoxwolf","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-06T14:29:27.000Z","size":109,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T05:45:58.977Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noppefoxwolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-10-26T06:42:39.000Z","updated_at":"2021-05-05T15:06:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"f157e961-ac83-46f7-a81b-057fc91d0934","html_url":"https://github.com/noppefoxwolf/Bitrise-Swift","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"3c2a83147343fa5220f775e1e7f11e2563d9de94"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noppefoxwolf%2FBitrise-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noppefoxwolf%2FBitrise-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noppefoxwolf%2FBitrise-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noppefoxwolf%2FBitrise-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noppefoxwolf","download_url":"https://codeload.github.com/noppefoxwolf/Bitrise-Swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248731624,"owners_count":21152835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T22:48:32.527Z","updated_at":"2025-04-13T14:42:34.228Z","avatar_url":"https://github.com/noppefoxwolf.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API\n\nThis is an api generated from a OpenAPI 3.0 spec with [SwagGen](https://github.com/yonaskolb/SwagGen)\n\n## Operation\n\nEach operation lives under the `API` namespace and within an optional tag: `API(.tagName).operationId`. If an operation doesn't have an operationId one will be generated from the path and method.\n\nEach operation has a nested `Request` and a `Response`, as well as a static `service` property\n\n#### Service\n\nThis is the struct that contains the static information about an operation including it's id, tag, method, pre-modified path, and authorization requirements. It has a generic `ResponseType` type which maps to the `Response` type.\nYou shouldn't really need to interact with this service type.\n\n#### Request\n\nEach request is a subclass of `APIRequest` and has an `init` with a body param if it has a body, and a `options` struct for other url and path parameters. There is also a convenience init for passing parameters directly.\nThe `options` and `body` structs are both mutable so they can be modified before actually sending the request.\n\n#### Response\n\nThe response is an enum of all the possible responses the request can return. it also contains getters for the `statusCode`, whether it was `successful`, and the actual decoded optional `success` response. If the operation only has one type of failure type there is also an optional `failure` type.\n\n## Model\nModels that are sent and returned from the API are mutable classes. Each model is `Equatable` and `Codable`.\n\n`Required` properties are non optional and non-required are optional\n\nAll properties can be passed into the initializer, with `required` properties being mandatory.\n\nIf a model has `additionalProperties` it will have a subscript to access these by string\n\n## APIClient\nThe `APIClient` is used to encode, authorize, send, monitor, and decode the requests. There is a `APIClient.default` that uses the default `baseURL` otherwise a custom one can be initialized:\n\n```swift\npublic init(baseURL: String, sessionManager: SessionManager = .default, defaultHeaders: [String: String] = [:], behaviours: [RequestBehaviour] = [])\n```\n\n#### APIClient properties\n\n- `baseURL`: The base url that every request `path` will be appended to\n- `behaviours`: A list of [Request Behaviours](#requestbehaviour) to add to every request\n- `sessionManager`: An `Alamofire.SessionManager` that can be customized\n- `defaultHeaders`: Headers that will be applied to every request\n- `decodingQueue`: The `DispatchQueue` to decode responses on\n\n#### Making a request\nTo make a request first initialize a [Request](#request) and then pass it to `makeRequest`. The `complete` closure will be called with an `APIResponse`\n\n```swift\nfunc makeRequest\u003cT\u003e(_ request: APIRequest\u003cT\u003e, behaviours: [RequestBehaviour] = [], queue: DispatchQueue = DispatchQueue.main, complete: @escaping (APIResponse\u003cT\u003e) -\u003e Void) -\u003e Request? {\n```\n\nExample request (that is not neccessarily in this api):\n\n```swift\n\nlet getUserRequest = API.User.GetUser.Request(id: 123)\nlet apiClient = APIClient.default\n\napiClient.makeRequest(getUserRequest) { apiResponse in\n    switch apiResponse {\n        case .result(let apiResponseValue):\n        \tif let user = apiResponseValue.success {\n        \t\tprint(\"GetUser returned user \\(user)\")\n        \t} else {\n        \t\tprint(\"GetUser returned \\(apiResponseValue)\")\n        \t}\n        case .error(let apiError):\n        \tprint(\"GetUser failed with \\(apiError)\")\n    }\n}\n```\n\nEach [Request](#request) also has a `makeRequest` convenience function that uses `API.shared`.\n\n#### APIResponse\nThe `APIResponse` that gets passed to the completion closure contains the following properties:\n\n- `request`: The original request\n- `result`: A `Result` type either containing an `APIClientError` or the [Response](#response) of the request\n- `urlRequest`: The `URLRequest` used to send the request\n- `urlResponse`: The `HTTPURLResponse` that was returned by the request\n- `data`: The `Data` returned by the request.\n- `timeline`: The `Alamofire.Timeline` of the request which contains timing information.\n\n#### Encoding and Decoding\nOnly JSON requests and responses are supported. These are encoded and decoded by `JSONEncoder` and `JSONDecoder` respectively, using Swift's `Codable` apis.\nThere are some options to control how invalid JSON is handled when decoding and these are available as static properties on `API`:\n\n- `safeOptionalDecoding`: Whether to discard any errors when decoding optional properties. Defaults to `true`.\n- `safeArrayDecoding`: Whether to remove invalid elements instead of throwing when decoding arrays. Defaults to `true`.\n\nDates are encoded and decoded differently according to the swagger date format. They use different `DateFormatter`'s that you can set.\n- `date-time`\n    - `DateTime.dateEncodingFormatter`: defaults to `yyyy-MM-dd'T'HH:mm:ss.Z`\n    - `DateTime.dateDecodingFormatters`: an array of date formatters. The first one to decode successfully will be used\n- `date`\n    - `DateDay.dateFormatter`: defaults to `yyyy-MM-dd`\n\n#### APIClientError\nThis is error enum that `APIResponse.result` may contain:\n\n```swift\npublic enum APIClientError: Error {\n    case unexpectedStatusCode(statusCode: Int, data: Data)\n    case decodingError(DecodingError)\n    case requestEncodingError(String)\n    case validationError(String)\n    case networkError(Error)\n    case unknownError(Error)\n}\n```\n\n#### RequestBehaviour\nRequest behaviours are used to modify, authorize, monitor or respond to requests. They can be added to the `APIClient.behaviours` for all requests, or they can passed into `makeRequest` for just that single request.\n\n`RequestBehaviour` is a protocol you can conform to with each function being optional. As the behaviours must work across multiple different request types, they only have access to a typed erased `AnyRequest`.\n\n```swift\npublic protocol RequestBehaviour {\n\n    /// runs first and allows the requests to be modified. If modifying asynchronously use validate\n    func modifyRequest(request: AnyRequest, urlRequest: URLRequest) -\u003e URLRequest\n\n    /// validates and modifies the request. complete must be called with either .success or .fail\n    func validate(request: AnyRequest, urlRequest: URLRequest, complete: @escaping (RequestValidationResult) -\u003e Void)\n\n    /// called before request is sent\n    func beforeSend(request: AnyRequest)\n\n    /// called when request successfuly returns a 200 range response\n    func onSuccess(request: AnyRequest, result: Any)\n\n    /// called when request fails with an error. This will not be called if the request returns a known response even if the a status code is out of the 200 range\n    func onFailure(request: AnyRequest, error: APIClientError)\n\n    /// called if the request recieves a network response. This is not called if request fails validation or encoding\n    func onResponse(request: AnyRequest, response: AnyResponse)\n}\n```\n\n### Authorization\nEach request has an optional `securityRequirement`. You can create a `RequestBehaviour` that checks this requirement and adds some form of authorization (usually via headers) in `validate` or `modifyRequest`. An alternative way is to set the `APIClient.defaultHeaders` which applies to all requests.\n\n#### Reactive and Promises\nTo add support for a specific asynchronous library, just add an extension on `APIClient` and add a function that wraps the `makeRequest` function and converts from a closure based syntax to returning the object of choice (stream, future...ect)\n\n## Models\n\n- **AddonsAddon**\n- **AddonsDeveloperLink**\n- **AddonsFeature**\n- **AddonsPlan**\n- **ServiceStandardErrorRespModel**\n- **V0ActivityEventListResponseModel**\n- **V0ActivityEventResponseItemModel**\n- **V0AddOnAppResponseItemModel**\n- **V0AddonsListResponseModel**\n- **V0AddonsShowResponseModel**\n- **V0AndroidKeystoreFileUploadParams**\n- **V0AppAddOnResponseItemModel**\n- **V0AppAddOnsListResponseModel**\n- **V0AppConfigRequestParam**\n- **V0AppConfigRespModel**\n- **V0AppFinishParams**\n- **V0AppFinishRespModel**\n- **V0AppListResponseModel**\n- **V0AppRespModel**\n- **V0AppResponseItemModel**\n- **V0AppShowResponseModel**\n- **V0AppUploadParams**\n- **V0AppWebhookCreateParams**\n- **V0AppWebhookCreatedResponseModel**\n- **V0AppWebhookDeletedResponseModel**\n- **V0AppWebhookListResponseModel**\n- **V0AppWebhookResponseItemModel**\n- **V0AppWebhookResponseModel**\n- **V0AppWebhookUpdateParams**\n- **V0ArtifactDeleteResponseModel**\n- **V0ArtifactListElementResponseModel**\n- **V0ArtifactListResponseModel**\n- **V0ArtifactResponseItemModel**\n- **V0ArtifactShowResponseModel**\n- **V0ArtifactUpdateParams**\n- **V0AvatarCandidateCreateBulkParams**\n- **V0AvatarCandidateCreateParams**\n- **V0AvatarCandidateCreateResponseItem**\n- **V0AvatarCandidateCreateResponseItems**\n- **V0AvatarPromoteParams**\n- **V0AvatarPromoteResponseItemModel**\n- **V0AvatarPromoteResponseModel**\n- **V0BranchListResponseModel**\n- **V0BuildAbortParams**\n- **V0BuildAbortResponseModel**\n- **V0BuildCertificateListResponseModel**\n- **V0BuildCertificateResponseItemModel**\n- **V0BuildCertificateResponseModel**\n- **V0BuildCertificateUpdateParams**\n- **V0BuildCertificateUploadParams**\n- **V0BuildListAllResponseItemModel**\n- **V0BuildListAllResponseModel**\n- **V0BuildListResponseModel**\n- **V0BuildLogChunkItemResponseModel**\n- **V0BuildLogInfoResponseModel**\n- **V0BuildParamsEnvironment**\n- **V0BuildRequestListResponseModel**\n- **V0BuildRequestResponseItemModel**\n- **V0BuildRequestUpdateParams**\n- **V0BuildRequestUpdateResponseModel**\n- **V0BuildResponseItemModel**\n- **V0BuildShowResponseModel**\n- **V0BuildTriggerParams**\n- **V0BuildTriggerParamsBuildParams**\n- **V0BuildTriggerParamsHookInfo**\n- **V0BuildTriggerRespModel**\n- **V0BuildWorkflowListResponseModel**\n- **V0CommitPaths**\n- **V0FindAvatarCandidateResponse**\n- **V0FindAvatarCandidateResponseItem**\n- **V0OrganizationDataModel**\n- **V0OrganizationListRespModel**\n- **V0OrganizationOwner**\n- **V0OrganizationRespModel**\n- **V0OwnerAccountResponseModel**\n- **V0OwnerAddOnResponseItemModel**\n- **V0OwnerAddOnsListResponseModel**\n- **V0PagingResponseModel**\n- **V0PlanDataModel**\n- **V0ProjectFileStorageDocumentUpdateParams**\n- **V0ProjectFileStorageListResponseModel**\n- **V0ProjectFileStorageResponseItemModel**\n- **V0ProjectFileStorageResponseModel**\n- **V0ProjectFileStorageUploadParams**\n- **V0ProvProfileDocumentUpdateParams**\n- **V0ProvisionProfileListResponseModel**\n- **V0ProvisionProfileResponseItemModel**\n- **V0ProvisionProfileResponseModel**\n- **V0ProvisionProfileUploadParams**\n- **V0SSHKeyRespModel**\n- **V0SSHKeyUploadParams**\n- **V0TestDeviceListResponseModel**\n- **V0TestDeviceResponseItemModel**\n- **V0UserPlanDataModel**\n- **V0UserPlanRespModel**\n- **V0UserProfileDataModel**\n- **V0UserProfileRespModel**\n- **V0WebhookDeliveryItemResponseModel**\n- **V0WebhookDeliveryItemShowResponseModel**\n- **V0WebhookRespModel**\n\n## Requests\n\n- **API.Activity**\n\t- **ActivityList**: GET `/me/activities`\n- **API.Addons**\n\t- **AddonListByApp**: GET `/apps/{app-slug}/addons`\n\t- **AddonListByOrganization**: GET `/organizations/{organization-slug}/addons`\n\t- **AddonListByUser**: GET `/users/{user-slug}/addons`\n\t- **AddonsList**: GET `/addons`\n\t- **AddonsShow**: GET `/addons/{addon-id}`\n- **API.AndroidKeystoreFile**\n\t- **AndroidKeystoreFileCreate**: POST `/apps/{app-slug}/android-keystore-files`\n\t- **AndroidKeystoreFileList**: GET `/apps/{app-slug}/android-keystore-files`\n- **API.AppSetup**\n\t- **AppConfigCreate**: POST `/apps/{app-slug}/bitrise.yml`\n\t- **AppCreate**: POST `/apps/register`\n\t- **AppFinish**: POST `/apps/{app-slug}/finish`\n\t- **AppWebhookCreate**: POST `/apps/{app-slug}/register-webhook`\n\t- **SshKeyCreate**: POST `/apps/{app-slug}/register-ssh-key`\n- **API.Application**\n\t- **AppConfigDatastoreShow**: GET `/apps/{app-slug}/bitrise.yml`\n\t- **AppList**: GET `/apps`\n\t- **AppListByOrganization**: GET `/organizations/{org-slug}/apps`\n\t- **AppListByUser**: GET `/users/{user-slug}/apps`\n\t- **AppShow**: GET `/apps/{app-slug}`\n\t- **BranchList**: GET `/apps/{app-slug}/branches`\n- **API.AvatarCandidate**\n\t- **AvatarCandidateCreate**: POST `/apps/{app-slug}/avatar-candidates`\n\t- **AvatarCandidateList**: GET `/v0.1/apps/{app-slug}/avatar-candidates`\n\t- **AvatarCandidatePromote**: PATCH `/apps/{app-slug}/avatar-candidates/{avatar-slug}`\n- **API.BuildArtifact**\n\t- **ArtifactDelete**: DELETE `/apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}`\n\t- **ArtifactList**: GET `/apps/{app-slug}/builds/{build-slug}/artifacts`\n\t- **ArtifactShow**: GET `/apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}`\n\t- **ArtifactUpdate**: PATCH `/apps/{app-slug}/builds/{build-slug}/artifacts/{artifact-slug}`\n- **API.BuildCertificate**\n\t- **BuildCertificateConfirm**: POST `/apps/{app-slug}/build-certificates/{build-certificate-slug}/uploaded`\n\t- **BuildCertificateCreate**: POST `/apps/{app-slug}/build-certificates`\n\t- **BuildCertificateDelete**: DELETE `/apps/{app-slug}/build-certificates/{build-certificate-slug}`\n\t- **BuildCertificateList**: GET `/apps/{app-slug}/build-certificates`\n\t- **BuildCertificateShow**: GET `/apps/{app-slug}/build-certificates/{build-certificate-slug}`\n\t- **BuildCertificateUpdate**: PATCH `/apps/{app-slug}/build-certificates/{build-certificate-slug}`\n- **API.BuildRequest**\n\t- **BuildRequestList**: GET `/apps/{app-slug}/build-requests`\n\t- **BuildRequestUpdate**: PATCH `/apps/{app-slug}/build-requests/{build-request-slug}`\n- **API.Builds**\n\t- **BuildAbort**: POST `/apps/{app-slug}/builds/{build-slug}/abort`\n\t- **BuildBitriseYmlShow**: GET `/apps/{app-slug}/builds/{build-slug}/bitrise.yml`\n\t- **BuildList**: GET `/apps/{app-slug}/builds`\n\t- **BuildListAll**: GET `/builds`\n\t- **BuildLog**: GET `/apps/{app-slug}/builds/{build-slug}/log`\n\t- **BuildShow**: GET `/apps/{app-slug}/builds/{build-slug}`\n\t- **BuildTrigger**: POST `/apps/{app-slug}/builds`\n\t- **BuildWorkflowList**: GET `/apps/{app-slug}/build-workflows`\n- **API.GenericProjectFile**\n\t- **GenericProjectFileConfirm**: POST `/apps/{app-slug}/generic-project-files/{generic-project-file-slug}/uploaded`\n\t- **GenericProjectFileDelete**: DELETE `/apps/{app-slug}/generic-project-files/{generic-project-file-slug}`\n\t- **GenericProjectFileList**: GET `/apps/{app-slug}/generic-project-files`\n\t- **GenericProjectFileShow**: GET `/apps/{app-slug}/generic-project-files/{generic-project-file-slug}`\n\t- **GenericProjectFileUpdate**: PATCH `/apps/{app-slug}/generic-project-files/{generic-project-file-slug}`\n\t- **GenericProjectFilesCreate**: POST `/apps/{app-slug}/generic-project-files`\n- **API.Organizations**\n\t- **OrgList**: GET `/organizations`\n\t- **OrgShow**: GET `/organizations/{org-slug}`\n- **API.OutgoingWebhook**\n\t- **OutgoingWebhookCreate**: POST `/apps/{app-slug}/outgoing-webhooks`\n\t- **OutgoingWebhookDelete**: DELETE `/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}`\n\t- **OutgoingWebhookList**: GET `/apps/{app-slug}/outgoing-webhooks`\n\t- **OutgoingWebhookUpdate**: PUT `/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}`\n- **API.ProvisioningProfile**\n\t- **ProvisioningProfileConfirm**: POST `/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}/uploaded`\n\t- **ProvisioningProfileCreate**: POST `/apps/{app-slug}/provisioning-profiles`\n\t- **ProvisioningProfileDelete**: DELETE `/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}`\n\t- **ProvisioningProfileList**: GET `/apps/{app-slug}/provisioning-profiles`\n\t- **ProvisioningProfileShow**: GET `/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}`\n\t- **ProvisioningProfileUpdate**: PATCH `/apps/{app-slug}/provisioning-profiles/{provisioning-profile-slug}`\n- **API.TestDevices**\n\t- **TestDeviceList**: GET `/apps/{app-slug}/test-devices`\n- **API.User**\n\t- **UserPlan**: GET `/me/plan`\n\t- **UserProfile**: GET `/me`\n\t- **UserShow**: GET `/users/{user-slug}`\n- **API.WebhookDeliveryItem**\n\t- **WebhookDeliveryItemList**: GET `/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items`\n\t- **WebhookDeliveryItemRedeliver**: POST `/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}/redeliver`\n\t- **WebhookDeliveryItemShow**: GET `/apps/{app-slug}/outgoing-webhooks/{app-webhook-slug}/delivery-items/{webhook-delivery-item-slug}`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoppefoxwolf%2Fbitrise-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoppefoxwolf%2Fbitrise-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoppefoxwolf%2Fbitrise-swift/lists"}