src Resources

概要

You can use the Bitbucket src resource to browse directories and view files. This is a read-only resource.

GET a list of repo source

Gets a list of the src in a repository. You must supply the following parameters:

パラメーター 説明
accountname A team or individual account name.
repo_slug The repository's name.
revision A value representing the revision or branch to list.
path The path can be a filename or a directory path. If path ends with / it is interpreted as a directory and returns a list.
https://api.bitbucket.org/1.0/repositories/{accountname}/{repo_slug}/src/{revision}/{path}
Click to view the data returned on success...
{
  "node": "40e232b389b9",
  "path": "Readme",
  "data": "Favorite Quotes from bitbuckians\n--------------------------------\n\nThis page lists the favorite quotes from any bitbuckian that cares to\ncontribute. This is a family-oriented site, so only post stuff you are\ncomfortable showing to your family. If your family is seriously abnormal, my\ncondolences and I'm going to reject your sadly twisted pull request.\n\nPlease don't change another user's quote as I'll reject that as well. After\nall, some quotes a meaningful to the people who submit them. You are free to\nfix and/or improve the CSS or code if you like.\n\nNow using SSH\n",
  "size": 571
}

GET raw content of an individual file

Gets information about an individual file. This method returns the file's size and contents.  If the file is encoded, this method returns the files encoding; Currently, Bitbucket supports only base64 encoding. You must supply the following parameters:

パラメーター 必須 説明
accountname はい A team or individual account name.
repo_slug はい The repository's name.
revision はい A value representing the revision or branch to list.
path はい The path can be a filename or a directory path. If path ends with / (forward slash), Bitbucket interprets the path as a directory and returns a list.

Supply a path value whose end node is a file name.

https://api.bitbucket.org/1.0/repositories/{accountname}/{repo_slug}/raw/{revision}/{path}
Click to view the data returned on success...

 

 

Favorite Quotes from bitbuckians
--------------------------------

This page lists the favorite quotes from any bitbuckian that cares to
contribute. This is a family-oriented site, so only post stuff you are
comfortable showing to your family. If your family is seriously abnormal, my
condolences and I'm going to reject your sadly twisted pull request.

Please don't change another user's quote as I'll reject that as well. After
all, some quotes a meaningful to the people who submit them. You are free to
fix and/or improve the CSS or code if you like.

Now using SSH

 

 

 

最終更新日: 2015 年 12 月 21 日

この翻訳に満足しましたか?

はい
いいえ
この記事についてのフィードバックを送信する

お探しの情報が見つかりませんか?

コミュニティへの質問

Powered by Confluence and Scroll Viewport.