Class: Tinybucket::Api::DiffApi
- Includes:
- Helper::DiffHelper
- Defined in:
- lib/tinybucket/api/diff_api.rb
Overview
Diff 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(spec, options = {}) ⇒ String
Send ‘GET a diff’ request.
-
#find_patch(spec, options = {}) ⇒ String
Send ‘GET a patch’ request.
Methods included from Connection
#caching?, #clear_cache, #connection
Instance Attribute Details
#repo_owner ⇒ String
Returns repository owner name.
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 |
# File 'lib/tinybucket/api/diff_api.rb', line 14 class DiffApi < BaseApi include Tinybucket::Api::Helper::DiffHelper attr_accessor :repo_owner, :repo_slug # Send 'GET a diff' request # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text def find(spec, = {}) get_path(path_to_find(spec), ) end # Send 'GET a patch' request # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] patch as raw text def find_patch(spec, = {}) get_path(path_to_patch(spec), ) end end |
#repo_slug ⇒ String
Returns repository slug.
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 |
# File 'lib/tinybucket/api/diff_api.rb', line 14 class DiffApi < BaseApi include Tinybucket::Api::Helper::DiffHelper attr_accessor :repo_owner, :repo_slug # Send 'GET a diff' request # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] diff as raw text def find(spec, = {}) get_path(path_to_find(spec), ) end # Send 'GET a patch' request # # @param spec [String] A specification such as a branch name, # revision, or commit SHA. # @param options [Hash] # @return [String] patch as raw text def find_patch(spec, = {}) get_path(path_to_patch(spec), ) end end |
Instance Method Details
#find(spec, options = {}) ⇒ String
Send ‘GET a diff’ request
25 26 27 |
# File 'lib/tinybucket/api/diff_api.rb', line 25 def find(spec, = {}) get_path(path_to_find(spec), ) end |
#find_patch(spec, options = {}) ⇒ String
Send ‘GET a patch’ request
35 36 37 |
# File 'lib/tinybucket/api/diff_api.rb', line 35 def find_patch(spec, = {}) get_path(path_to_patch(spec), ) end |