Class: Tinybucket::Api::RepoApi
- Includes:
- Helper::RepoHelper
- Defined in:
- lib/tinybucket/api/repo_api.rb
Overview
Repo 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(options = {}) ⇒ Tinybucket::Model::Repository
Send ‘GET a repository’ request.
-
#forks(options = {}) ⇒ Tinybucket::Model::Page
Send ‘GET a list of forks’ request.
-
#watchers(options = {}) ⇒ Tinybucket::Model::Page
Send ‘GET a list of watchers’ request.
Methods included from Connection
#caching?, #clear_cache, #connection
Instance Attribute Details
#repo_owner ⇒ String
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 |
# File 'lib/tinybucket/api/repo_api.rb', line 14 class RepoApi < BaseApi include Tinybucket::Api::Helper::RepoHelper attr_accessor :repo_owner, :repo_slug # Send 'GET a repository' request # # @param options [Hash] # @return [Tinybucket::Model::Repository] def find( = {}) get_path( path_to_find, , get_parser(:object, Tinybucket::Model::Repository) ) end # Send 'GET a list of watchers' request # # @param options [Hash] # @return [Tinybucket::Model::Page] def watchers( = {}) get_path( path_to_watchers, , get_parser(:collection, Tinybucket::Model::Profile) ) end # Send 'GET a list of forks' request # # @param options [Hash] # @return [Tinybucket::Model::Page] def forks( = {}) get_path( path_to_forks, , get_parser(:collection, Tinybucket::Model::Repository) ) end end |
#repo_slug ⇒ String
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 |
# File 'lib/tinybucket/api/repo_api.rb', line 14 class RepoApi < BaseApi include Tinybucket::Api::Helper::RepoHelper attr_accessor :repo_owner, :repo_slug # Send 'GET a repository' request # # @param options [Hash] # @return [Tinybucket::Model::Repository] def find( = {}) get_path( path_to_find, , get_parser(:object, Tinybucket::Model::Repository) ) end # Send 'GET a list of watchers' request # # @param options [Hash] # @return [Tinybucket::Model::Page] def watchers( = {}) get_path( path_to_watchers, , get_parser(:collection, Tinybucket::Model::Profile) ) end # Send 'GET a list of forks' request # # @param options [Hash] # @return [Tinybucket::Model::Page] def forks( = {}) get_path( path_to_forks, , get_parser(:collection, Tinybucket::Model::Repository) ) end end |
Instance Method Details
#find(options = {}) ⇒ Tinybucket::Model::Repository
Send ‘GET a repository’ request
23 24 25 26 27 28 29 |
# File 'lib/tinybucket/api/repo_api.rb', line 23 def find( = {}) get_path( path_to_find, , get_parser(:object, Tinybucket::Model::Repository) ) end |
#forks(options = {}) ⇒ Tinybucket::Model::Page
Send ‘GET a list of forks’ request
47 48 49 50 51 52 53 |
# File 'lib/tinybucket/api/repo_api.rb', line 47 def forks( = {}) get_path( path_to_forks, , get_parser(:collection, Tinybucket::Model::Repository) ) end |
#watchers(options = {}) ⇒ Tinybucket::Model::Page
Send ‘GET a list of watchers’ request
35 36 37 38 39 40 41 |
# File 'lib/tinybucket/api/repo_api.rb', line 35 def watchers( = {}) get_path( path_to_watchers, , get_parser(:collection, Tinybucket::Model::Profile) ) end |