Beanstalk HTTP client v0.1.0 Beanstalk.Repository

Manage your repositories.

See: http://api.beanstalkapp.com/repository.html

Summary

Functions

Returns a full list of repositories within your Beanstalk account

Returns a paginated list of repositories within your Beanstalk account

Returns an array of repository’s branches

Delete a repository

Returns a single repository matching the given repository_id

Returns an array of repository’s tags

Functions

all()

Returns a full list of repositories within your Beanstalk account.

all(page, per_page)

Returns a paginated list of repositories within your Beanstalk account.

Set the page number and per page.

Args:

  • page - page number for pagination.
  • per_page - number of elements per page (default 30, maximum 50).
branches(repository_id)

Returns an array of repository’s branches.

For Subversion always returns an empty array.

Args:

  • repository_id - The id attribute from the repository object.
create(name, title, color_label, type_id \\ "git")

Create a new repository

Args:

  • name - this is the slug (e.g. my-repository) of the repository.
  • title - the title of the repository (e.g. ‘My Repository’).
  • color_label - name of the specified color label. See Beanstalk documentation for full list.
  • type_id - Type of repostory. Choices are git or subversion. Default is git.
delete(repository_id)

Delete a repository

Args:

  • repository_id - The id attribute from the repository object.
find(repository_id)

Returns a single repository matching the given repository_id.

Args:

  • repository_id - The id attribute from the repository object.
rename(repository_id, name, title)

Rename a repository.

Args:

  • repository_id - The id attribute from the repository object.
  • name - this is the slug (e.g. my-repository) of the repository.
  • title - the title of the repository (e.g. ‘My Repository’).
tags(repository_id)

Returns an array of repository’s tags.

For Subversion always returns an empty array

Args:

  • repository_id - The id attribute from the repository object.
update(repository_id, name, title, color_label, type_id \\ "git")

Update an existing repository

Args:

  • repository_id - The id attribute from the repository object.
  • name - this is the slug (e.g. my-repository) of the repository.
  • title - the title of the repository (e.g. ‘My Repository’).
  • color_label - name of the specified color label. See Beanstalk documentation for full list.
  • type_id - Type of repostory. Choices are git or subversion. Default is git.