Skip to content

Commit 1964c02

Browse files
committed
[docs] Added pages for Refs/Branches & Refs/Tags
1 parent 4ff57a1 commit 1964c02

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

docs/examples/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ title: Examples
4747
- [Pull requests](repositories/pull-requests.html)
4848
- [Comments](repositories/pull-requests/comments.html)
4949
- [Repository](repositories/repository.html)
50+
- [Refs](#)
51+
- [Branches](repositories/refs/branches.html)
52+
- [Tags](repositories/refs/tags.html)
5053
- [Services](repositories/services.html)
5154
- [Hooks](repositories/webhooks.html)
5255
- [Src](repositories/src.html)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: default
3+
permalink: /examples/repositories/refs.html
4+
title: Branches
5+
---
6+
7+
# Branches
8+
9+
Allows you to get a list of branches.
10+
11+
### Prepare:
12+
{% include auth.md var_name="branches" class_ns="Repositories\Refs\Branches" %}
13+
14+
### Get a list of branches:
15+
16+
```php
17+
$branches->all($account_name, $repo_slug);
18+
```
19+
20+
### Get an individual branch:
21+
22+
```php
23+
$branches->get($account_name, $repo_slug, $branch_name);
24+
```
25+
26+
----
27+
28+
#### Related:
29+
* [Authentication]({{ site.url }}/examples/authentication.html)
30+
* [BB Wiki](https://confluence.atlassian.com/display/BITBUCKET/src+Resources)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: default
3+
permalink: /examples/repositories/refs.html
4+
title: Tags
5+
---
6+
7+
# Tags
8+
9+
Allows you to get a list of tags.
10+
11+
### Prepare:
12+
{% include auth.md var_name="tags" class_ns="Repositories\Refs\Tags" %}
13+
14+
### Get a list of tags:
15+
16+
```php
17+
$tags->all($account_name, $repo_slug);
18+
```
19+
20+
### Get an individual tag:
21+
22+
```php
23+
$tags->get($account_name, $repo_slug, $tag_name);
24+
```
25+
26+
### Create a new tag:
27+
28+
```php
29+
$tags->create($account_name, $repo_slug, $tag_name, $hash);
30+
```
31+
32+
----
33+
34+
#### Related:
35+
* [Authentication]({{ site.url }}/examples/authentication.html)
36+
* [BB Wiki](https://confluence.atlassian.com/display/BITBUCKET/src+Resources)

0 commit comments

Comments
 (0)