Class: Tinybucket::Api::IssuesApi
- Includes:
- Helper::IssuesHelper
- Defined in:
- lib/tinybucket/api/issues_api.rb
Overview
Issues Api client
Constant Summary
Constants included from Connection
Connection::DEFAULT_USER_AGENT
Instance Attribute Summary collapse
-
#repo_owner ⇒ String
Repository owner name.
- #repo_slug ⇒ String
Instance Method Summary collapse
-
#find(name, options = {}) ⇒ Tinybucket::Model::Issue
Send ‘GET an individual issue’ request.
-
#list(options = {}) ⇒ Tinybucket::Model::Page
Send ‘GET a issues list for a repository’ request.
-
#post(options) ⇒ Tinybucket::Model::Issue
Send ‘POST a build status for a commit’ request.
Methods included from Connection
#caching?, #clear_cache, #connection
Instance Attribute Details
#repo_owner ⇒ String
Returns repository owner name.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/tinybucket/api/issues_api.rb', line 11 class IssuesApi < BaseApi include Tinybucket::Api::Helper::IssuesHelper attr_accessor :repo_owner, :repo_slug # Send 'GET a issues list for a repository' request # # @see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/issues#get # GET a issues list for a repository # # @param options [Hash] # @return [Tinybucket::Model::Page] def list( = {}) get_path( path_to_list, , get_parser(:collection, Tinybucket::Model::Issue) ) end # Send 'POST a build status for a commit' request # # @param revision [String] # @param key [String] # @param options [Hash] # @return [Tinybucket::Model::Issue] def post() post_path( base_path, , get_parser(:object, Tinybucket::Model::Issue) ) end # Send 'GET an individual issue' request # # @see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/issues/%7Bname%7D#get # GET an individual issue # # @param name [String] The issue name # @param options [Hash] # @return [Tinybucket::Model::Issue] def find(name, = {}) get_path( path_to_find(name), , get_parser(:object, Tinybucket::Model::Issue) ) end end |
#repo_slug ⇒ String
Returns repo_slug.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/tinybucket/api/issues_api.rb', line 11 class IssuesApi < BaseApi include Tinybucket::Api::Helper::IssuesHelper attr_accessor :repo_owner, :repo_slug # Send 'GET a issues list for a repository' request # # @see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/issues#get # GET a issues list for a repository # # @param options [Hash] # @return [Tinybucket::Model::Page] def list( = {}) get_path( path_to_list, , get_parser(:collection, Tinybucket::Model::Issue) ) end # Send 'POST a build status for a commit' request # # @param revision [String] # @param key [String] # @param options [Hash] # @return [Tinybucket::Model::Issue] def post() post_path( base_path, , get_parser(:object, Tinybucket::Model::Issue) ) end # Send 'GET an individual issue' request # # @see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/issues/%7Bname%7D#get # GET an individual issue # # @param name [String] The issue name # @param options [Hash] # @return [Tinybucket::Model::Issue] def find(name, = {}) get_path( path_to_find(name), , get_parser(:object, Tinybucket::Model::Issue) ) end end |
Instance Method Details
#find(name, options = {}) ⇒ Tinybucket::Model::Issue
Send ‘GET an individual issue’ request
54 55 56 57 58 59 60 |
# File 'lib/tinybucket/api/issues_api.rb', line 54 def find(name, = {}) get_path( path_to_find(name), , get_parser(:object, Tinybucket::Model::Issue) ) end |
#list(options = {}) ⇒ Tinybucket::Model::Page
Send ‘GET a issues list for a repository’ request
23 24 25 26 27 28 29 |
# File 'lib/tinybucket/api/issues_api.rb', line 23 def list( = {}) get_path( path_to_list, , get_parser(:collection, Tinybucket::Model::Issue) ) end |
#post(options) ⇒ Tinybucket::Model::Issue
Send ‘POST a build status for a commit’ request
38 39 40 41 42 43 44 |
# File 'lib/tinybucket/api/issues_api.rb', line 38 def post() post_path( base_path, , get_parser(:object, Tinybucket::Model::Issue) ) end |