Class: Tinybucket::Api::BuildStatusApi

Inherits:
BaseApi
  • Object
show all
Includes:
Helper::BuildStatusHelper
Defined in:
lib/tinybucket/api/build_status_api.rb

Overview

BuildStatus Api client

Constant Summary

Constants included from Connection

Connection::DEFAULT_USER_AGENT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Connection

#caching?, #clear_cache, #connection

Instance Attribute Details

#repo_ownerObject

Returns the value of attribute repo_owner.


12
13
14
# File 'lib/tinybucket/api/build_status_api.rb', line 12

def repo_owner
  @repo_owner
end

#repo_slugObject

Returns the value of attribute repo_slug.


12
13
14
# File 'lib/tinybucket/api/build_status_api.rb', line 12

def repo_slug
  @repo_slug
end

#revisionObject

Returns the value of attribute revision.


12
13
14
# File 'lib/tinybucket/api/build_status_api.rb', line 12

def revision
  @revision
end

Instance Method Details

#find(revision, key, options = {}) ⇒ Tinybucket::Model::BuildStatus

Send 'GET the build status for a commit' request

Parameters:

  • revision (String)
  • key (String)
  • options (Hash) (defaults to: {})

Returns:


32
33
34
35
36
37
38
# File 'lib/tinybucket/api/build_status_api.rb', line 32

def find(revision, key, options = {})
  get_path(
    path_to_find(revision, key),
    options,
    get_parser(:object, Tinybucket::Model::BuildStatus)
  )
end

#list(options = {}) ⇒ Tinybucket::Model::Page

Send 'GET a builds list for a commit' request

Parameters:

  • options (Hash) (defaults to: {})

Returns:


18
19
20
21
22
23
24
# File 'lib/tinybucket/api/build_status_api.rb', line 18

def list(options = {})
  get_path(
    path_to_list,
    options,
    get_parser(:collection, Tinybucket::Model::BuildStatus)
  )
end

#post(revision, key, options) ⇒ Tinybucket::Model::BuildStatus

Send 'POST a build status for a commit' request

Parameters:

  • revision (String)
  • key (String)
  • options (Hash)

Returns:


46
47
48
49
50
51
52
# File 'lib/tinybucket/api/build_status_api.rb', line 46

def post(revision, key, options)
  post_path(
    path_to_post(revision),
    options.merge(key: key),
    get_parser(:object, Tinybucket::Model::BuildStatus)
  )
end

#put(revision, key, options) ⇒ Tinybucket::Model::BuildStatus

Send 'PUT a build status for a commit' request

Parameters:

  • revision (String)
  • key (String)
  • options (Hash)

Returns:


60
61
62
63
64
65
66
# File 'lib/tinybucket/api/build_status_api.rb', line 60

def put(revision, key, options)
  put_path(
    path_to_put(revision, key),
    options,
    get_parser(:object, Tinybucket::Model::BuildStatus)
  )
end