{"id":24526029,"url":"https://github.com/evref-bl/bitbucket-pharo-api","last_synced_at":"2026-01-03T00:09:58.735Z","repository":{"id":273540387,"uuid":"919375851","full_name":"Evref-BL/Bitbucket-Pharo-API","owner":"Evref-BL","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T15:50:43.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-11T16:39:21.511Z","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}},"created_at":"2025-01-20T09:26:11.000Z","updated_at":"2025-03-11T15:50:43.000Z","dependencies_parsed_at":"2025-01-21T14:38:55.743Z","dependency_job_id":"166d773a-9619-49db-9c5e-73988463bdbe","html_url":"https://github.com/Evref-BL/Bitbucket-Pharo-API","commit_stats":null,"previous_names":["evref-bl/bitbucket-pharo-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucket-Pharo-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucket-Pharo-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucket-Pharo-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evref-BL%2FBitbucket-Pharo-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Evref-BL","download_url":"https://codeload.github.com/Evref-BL/Bitbucket-Pharo-API/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243753989,"owners_count":20342537,"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":"2025-01-22T05:29:32.612Z","updated_at":"2026-01-03T00:09:58.730Z","avatar_url":"https://github.com/Evref-BL.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitbucket-Pharo-API\n\n[![Continuous](https://github.com/Evref-BL/Bitbucket-Pharo-API/actions/workflows/continuous.yml/badge.svg)](https://github.com/Evref-BL/Bitbucket-Pharo-API/actions/workflows/continuous.yml)\n[![Coverage Status](https://coveralls.io/repos/github/Evref-BL/Bitbucket-Pharo-API/badge.svg?branch=develop)](https://coveralls.io/github/Evref-BL/Bitbucket-Pharo-API?branch=develop)\n\nThis is a Pharo client for the [Bitbucket Server REST API](https://docs.atlassian.com/bitbucket-server/rest/5.9.0/bitbucket-rest.html)\n\n## Usage\n\n### Installation\n\n#### From playground\n\n```st\nMetacello new\n  githubUser: 'Evref-BL' project: 'Bitbucket-Pharo-API' commitish: 'main' path: 'src';\n  baseline: 'BitbucketPharoAPI';\n  onConflict: [ :ex | ex useIncoming ];\n  load\n```\n\n#### Baseline dependency\n\n```st\n  spec\n    baseline: 'BitbucketPharoAPI' with: [\n      spec repository: 'github://Evref-BL/Bitbucket-Pharo-API:main'\n    ]\n```\n\n### Client\n\nTo start using the API, you need to create a client instance with your Bitbucket host and a Bearer token for authentication. Here’s an example:\n\n```st\nbitbucketApi := BitbucketApi new\n    host: 'bitbucket.org';\n    bearerToken: '\u003cyour token\u003e'.\n```\n\nReplace `\u003cyour token\u003e` with your actual Bitbucket token.\n\n### Ressources\n\nThe API provides different resource classes to interact with different entities in Bitbucket. These resources include:\n\n- branches\n- commits\n- projects\n- pullRequests\n- repositories\n- users\n\nEach resource provides methods for interacting with the corresponding Bitbucket resource. You can access them like this:\n\n```st\nbitbucketApi projects \u003cmethod\u003e\n```\n\n### Example\n\nHere are a few examples of how to interact with the API:\n\n#### Fetch All Projects\n\nThis example retrieves all projects from Bitbucket:\n\n```st\n| projects |\nprojects := bitbucketApi projects all\n```\n\n#### Fetch All Commits for a Specific Branch\n\nThis example demonstrates how to fetch all commits for the dev branch within a specific repository and project, using parameters:\n\n```st\n| commits params |\nparams := {\n  #until -\u003e 'dev'\n} asDictionary.\ncommits := bitbucketApi commits allWithParams: params inRepository: '\u003crepositorySlug\u003e' ofProject: '\u003cprojectKey\u003e'.\n```\n\nReplace `\u003crepositorySlug\u003e` with the slug of the repository and `\u003cprojectKey\u003e` with the project key.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevref-bl%2Fbitbucket-pharo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevref-bl%2Fbitbucket-pharo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevref-bl%2Fbitbucket-pharo-api/lists"}