{"id":31730774,"url":"https://github.com/evref-bl/bitbucketcloud-pharo-api","last_synced_at":"2026-02-17T15:02:48.860Z","repository":{"id":317225525,"uuid":"1063868164","full_name":"Evref-BL/BitbucketCloud-Pharo-Api","owner":"Evref-BL","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-07T11:40:11.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-10-07T13:28:23.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","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/Evref-BL.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T08:19:10.000Z","updated_at":"2025-10-07T11:35:11.000Z","dependencies_parsed_at":"2025-09-29T17:35:01.901Z","dependency_job_id":null,"html_url":"https://github.com/Evref-BL/BitbucketCloud-Pharo-Api","commit_stats":null,"previous_names":["evref-bl/bitbucketcloud-pharo-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Evref-BL/BitbucketCloud-Pharo-Api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucketCloud-Pharo-Api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucketCloud-Pharo-Api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucketCloud-Pharo-Api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucketCloud-Pharo-Api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Evref-BL","download_url":"https://codeload.github.com/Evref-BL/BitbucketCloud-Pharo-Api/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucketCloud-Pharo-Api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000980,"owners_count":26082974,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-09T07:40:47.815Z","updated_at":"2025-10-09T07:40:51.169Z","avatar_url":"https://github.com/Evref-BL.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BitbucketCloud-Pharo-Api\n\n[![Continuous](https://github.com/Evref-BL/BitbucketCloud-Pharo-API/actions/workflows/continuous.yml/badge.svg)](https://github.com/Evref-BL/BitbucketCloud-Pharo-API/actions/workflows/continuous.yml)\n[![Coverage Status](https://coveralls.io/repos/github/Evref-BL/BitbucketCloud-Pharo-Api/badge.svg?branch=develop)](https://coveralls.io/github/Evref-BL/BitbucketCloud-Pharo-Api?branch=develop)\n\nA Pharo client for the [Bitbucket Cloud REST API](https://developer.atlassian.com/cloud/bitbucket/rest/intro)\n\nIf you are looking for a client targeting Bitbucket Server instead, check out: [Bitbucket-Pharo-API](https://github.com/Evref-BL/Bitbucket-Pharo-API).\n\n## Usage\n\n### Installation\n\n#### From playground\n\n```st\nMetacello new\n  githubUser: 'Evref-BL' project: 'BitbucketCloud-Pharo-API' commitish: 'main' path: 'src';\n  baseline: 'BitbucketCloudPharoAPI';\n  onConflict: [ :ex | ex useIncoming ];\n  load\n```\n\n#### Baseline dependency\n\n```st\n  spec\n    baseline: 'BitbucketCloudPharoAPI' with: [\n      spec repository: 'github://Evref-BL/BitbucketCloud-Pharo-API:main'\n    ]\n```\n\n### Client\n\nTo start using the API, create a BitbucketCloudApi client instance. The API supports two authentication methods: access token or API token (with username).\n\n\n#### Using an Access Token\n```st\nbitbucketCloudApi := BitbucketCloudApi new\n  host: 'api.bitbucket.org';\n  accessToken: '\u003cyour-access-token\u003e'.\n```\n\n#### Using an API Token\n```st\nbitbucketCloudApi := BitbucketCloudApi new\n  host: 'api.bitbucket.org';\n  username: '\u003cyour-email\u003e';\n  apiToken: '\u003cyour-api-token\u003e'.\n```\n\n### Ressources\n\nThe API provides different resource classes to interact with different entities in Bitbucket. These resources include:\n\n- pullRequests\n- refs\n- repositories\n- source\n\nEach resource provides methods for interacting with the corresponding Bitbucket resource. You can access them like this:\n\n```st\nbitbucketCloudApi repositories \u003cmethod\u003e\n```\n\n### Example\n\nHere are a few examples of how to interact with the API:\n\n#### Retrieve a Pull Request\n\nFetch a pull request by ID within a repository and workspace:\n\n```st\n| pullRequest |\npullRequest := bitbucketCloudApi pullRequests get: \u003cpullRequestId\u003e inRepository: '\u003crepoSlug\u003e' ofWorkspace: '\u003cworkspace\u003e'.\n```\n\n#### List Files and Directories in a Repository\n\nRetrieve files/directories in a repository branch with parameters (e.g., depth):\n\n```st\n| commits params |\nparams := { \n\t'max_depth' -\u003e '10'\n} asDictionary.\nbitbucketCloudApi repositories getFileOrDirectory: '' fromCommit: '\u003cbranchName\u003e' inRepository: '\u003crepoSlug\u003e' ofWorkspace: '\u003cworkspace\u003e' withParams: params.\n```\n\n#### Create a commit \n\nCreate a commit on a branch (only works with API token authentication):\n\n```st\n| commits params |\ncommit := BitbucketCloudSourceCommit new\n  message: 'Update README';\n  branch: 'dev';\n  addFile: 'README.md' withNewContent: 'This is my updated README content.'.\n\nbitbucketCloudApi source createCommit: commit inRepository: '\u003crepoSlug\u003e' ofWorkspace: '\u003cworkspace\u003e'.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevref-bl%2Fbitbucketcloud-pharo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevref-bl%2Fbitbucketcloud-pharo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevref-bl%2Fbitbucketcloud-pharo-api/lists"}