hirakiuc/tinybucket

View on GitHub
lib/tinybucket/api/helper/repo_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module Tinybucket
  module Api
    module Helper
      module RepoHelper
        include ::Tinybucket::Api::Helper::ApiHelper

        private

        def path_to_find
          base_path
        end

        def path_to_watchers
          build_path(base_path, '/watchers')
        end

        def path_to_forks
          build_path(base_path, '/forks')
        end

        def base_path
          build_path('/repositories',
                     [repo_owner, 'repo_owner'],
                     [repo_slug, 'repo_slug'])
        end
      end
    end
  end
end