class CircleCi::ApiProjectResource
Class for interacting with project API resources
Constants
- DEFAULT_VCS_TYPE
- VALID_VCS_TYPES
Attributes
build[R]
vcs_type[R]
Public Class Methods
new(username = nil, project = nil, vcs_type = nil, build = nil, conf = nil)
click to toggle source
Initialize a new Project
API interaction
@param username [String] - The vcs username or org name for project @param project [String] - The project name @param vcs_type
[String] - The vcs type i.e. github or bitbucket @param build [String] - The build number for a project @param conf [CircleCi::Config] - Optional config to use for request @return [CircleCi::Project]
Calls superclass method
# File lib/circleci/api_project_resource.rb, line 23 def initialize(username = nil, project = nil, vcs_type = nil, build = nil, conf = nil) # rubocop:disable Metrics/ParameterLists super(username, project, conf) @vcs_type = VALID_VCS_TYPES.include?(vcs_type) ? vcs_type : DEFAULT_VCS_TYPE @build = build end
Public Instance Methods
base_path()
click to toggle source
# File lib/circleci/api_project_resource.rb, line 29 def base_path "/project/#{vcs_type}/#{username}/#{project}" end