<commit_before>---
layout: default
permalink: /examples/
title: Examples
---

# Usage examples

**TIP:** Although all examples from this documentation are instantiating each class, a single point of entry is also available:

  ```php
  $bitbucket = new \Bitbucket\API\Api();
  $bitbucket->getClient()->addListener(
      new \Bitbucket\API\Http\Listener\BasicAuthListener('username', 'password')
  );

  /** @var \Bitbucket\API\User $user */
  $user = $bitbucket->api('User');

  /** @var \Bitbucket\API\Repositories\Issues $issues */
  $issues = $bitbucket->api('Repositories\Issues');
  ```

### Available examples

  - [Authentication](authentication.html)
  - [Group privileges](group-privileges.html)
  - [Groups](groups.html)
  - [Invitations](invitations.html)
  - [Privileges](privileges.html)
  - [Repositories](repositories.html)
    - [Branch restrictions](repositories/branch-restrictions.html)
    - [Changesets](repositories/changesets.html)
      - [Comments](repositories/changesets/comments.html)
    - [Commits](repositories/commits.html)
      - [Comments](repositories/commits/comments.html)
    - [Deploy keys](repositories/deploy-keys.html)
    - [Events](repositories/events.html)
    - [Followers](repositories/followers.html)
    - [Issues](repositories/issues.html)
      - [Comments](repositories/issues/comments.html)
      - [Components](repositories/issues/components.html)
      - [Milestones](repositories/issues/milestones.html)
      - [Versions](repositories/issues/versions.html)
    - [Links](repositories/links.html)
    - [Pull requests](repositories/pull-requests.html)
      - [Comments](repositories/pull-requests/comments.html)
    - [Repository](repositories/repository.html)
    - ~~[Services](repositories/services.html)~~ (deprecated since 0.7.0 -- @see [WebHooks](repositories/webhooks.html))
    - [Hooks](repositories/webhooks.html)
    - [Src](repositories/src.html)
    - [Wiki](repositories/wiki.html)
  - [Teams](teams.html)
  - [User](user.html)
    - [Repositories](user/repositories.html)
  - [Users](users.html)
    - [Account](users/account.html)
    - [Emails](users/emails.html)
    - [Invitations](users/invitations.html)
    - [OAuth](users/oauth.html)
    - [Privileges](users/privileges.html)
    - [SSH keys](users/ssh-keys.html)
<commit_msg>[DOCS] added 'Build statuses' to examples index<commit_after>---
layout: default
permalink: /examples/
title: Examples
---

# Usage examples

**TIP:** Although all examples from this documentation are instantiating each class, a single point of entry is also available:

  ```php
  $bitbucket = new \Bitbucket\API\Api();
  $bitbucket->getClient()->addListener(
      new \Bitbucket\API\Http\Listener\BasicAuthListener('username', 'password')
  );

  /** @var \Bitbucket\API\User $user */
  $user = $bitbucket->api('User');

  /** @var \Bitbucket\API\Repositories\Issues $issues */
  $issues = $bitbucket->api('Repositories\Issues');
  ```

### Available examples

  - [Authentication](authentication.html)
  - [Group privileges](group-privileges.html)
  - [Groups](groups.html)
  - [Invitations](invitations.html)
  - [Privileges](privileges.html)
  - [Repositories](repositories.html)
    - [Branch restrictions](repositories/branch-restrictions.html)
    - [Changesets](repositories/changesets.html)
      - [Comments](repositories/changesets/comments.html)
    - [Commits](repositories/commits.html)
      - [Comments](repositories/commits/comments.html)
    - [Deploy keys](repositories/deploy-keys.html)
    - [Events](repositories/events.html)
    - [Followers](repositories/followers.html)
    - [Issues](repositories/issues.html)
      - [Comments](repositories/issues/comments.html)
      - [Components](repositories/issues/components.html)
      - [Milestones](repositories/issues/milestones.html)
      - [Versions](repositories/issues/versions.html)
    - [Links](repositories/links.html)
    - [Pull requests](repositories/pull-requests.html)
      - [Comments](repositories/pull-requests/comments.html)
    - [Repository](repositories/repository.html)
    - ~~[Services](repositories/services.html)~~ (deprecated since 0.7.0 -- @see [WebHooks](repositories/webhooks.html))
    - [Hooks](repositories/webhooks.html)
    - [Src](repositories/src.html)
    - [Wiki](repositories/wiki.html)
    - [Build statuses](repositories/commits/build-statuses.html)
  - [Teams](teams.html)
  - [User](user.html)
    - [Repositories](user/repositories.html)
  - [Users](users.html)
    - [Account](users/account.html)
    - [Emails](users/emails.html)
    - [Invitations](users/invitations.html)
    - [OAuth](users/oauth.html)
    - [Privileges](users/privileges.html)
    - [SSH keys](users/ssh-keys.html)

{'fraction_non_alphanumeric': 0.16521739130434782, 'fraction_numerical': 0.0012725344644750796, 'mean_word_length': 3.887046632124352, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6849707', 'n_tokens_mistral': 1599, 'n_tokens_neox': 1522, 'n_words': 198}