class OSDNClient::ProjectSCMApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/osdn-client/api/project_scm_api.rb, line 30
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

create_project_bzr(id_or_name, name, opts = {}) click to toggle source

Create a new bzr repository @param id_or_name numeric project id or project name @param name @param [Hash] opts the optional parameters @option opts [String] :description @return [ProjectBzr]

# File lib/osdn-client/api/project_scm_api.rb, line 41
def create_project_bzr(id_or_name, name, opts = {})
  data, _status_code, _headers = create_project_bzr_with_http_info(id_or_name, name, opts)
  return data
end
create_project_bzr_with_http_info(id_or_name, name, opts = {}) click to toggle source

Create a new bzr repository @param id_or_name numeric project id or project name @param name @param [Hash] opts the optional parameters @option opts [String] :description @return [Array<(ProjectBzr, Fixnum, Hash)>] ProjectBzr data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 53
def create_project_bzr_with_http_info(id_or_name, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.create_project_bzr ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.create_project_bzr" if id_or_name.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling ProjectSCMApi.create_project_bzr" if name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/bzr".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["name"] = name
  form_params["description"] = opts[:'description'] if !opts[:'description'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectBzr')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#create_project_bzr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_project_git(id_or_name, name, opts = {}) click to toggle source

Create a new git repository @param id_or_name numeric project id or project name @param name @param [Hash] opts the optional parameters @option opts [String] :description @option opts [BOOLEAN] :mail_enabled @option opts [String] :mail_recipients @option opts [BOOLEAN] :allow_non_fast_forward @option opts [String] :default_branch @return [ProjectGit]

# File lib/osdn-client/api/project_scm_api.rb, line 110
def create_project_git(id_or_name, name, opts = {})
  data, _status_code, _headers = create_project_git_with_http_info(id_or_name, name, opts)
  return data
end
create_project_git_hook(id_or_name, repo_id, target_url, opts = {}) click to toggle source

Create a new hook for project git repository @param id_or_name numeric project id or project name @param repo_id @param target_url @param [Hash] opts the optional parameters @return [ScmHook]

# File lib/osdn-client/api/project_scm_api.rb, line 183
def create_project_git_hook(id_or_name, repo_id, target_url, opts = {})
  data, _status_code, _headers = create_project_git_hook_with_http_info(id_or_name, repo_id, target_url, opts)
  return data
end
create_project_git_hook_with_http_info(id_or_name, repo_id, target_url, opts = {}) click to toggle source

Create a new hook for project git repository @param id_or_name numeric project id or project name @param repo_id @param target_url @param [Hash] opts the optional parameters @return [Array<(ScmHook, Fixnum, Hash)>] ScmHook data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 195
def create_project_git_hook_with_http_info(id_or_name, repo_id, target_url, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.create_project_git_hook ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.create_project_git_hook" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.create_project_git_hook" if repo_id.nil?
  # verify the required parameter 'target_url' is set
  fail ArgumentError, "Missing the required parameter 'target_url' when calling ProjectSCMApi.create_project_git_hook" if target_url.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git/{repo_id}/hooks".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["target_url"] = target_url

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScmHook')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#create_project_git_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_project_git_with_http_info(id_or_name, name, opts = {}) click to toggle source

Create a new git repository @param id_or_name numeric project id or project name @param name @param [Hash] opts the optional parameters @option opts [String] :description @option opts [BOOLEAN] :mail_enabled @option opts [String] :mail_recipients @option opts [BOOLEAN] :allow_non_fast_forward @option opts [String] :default_branch @return [Array<(ProjectGit, Fixnum, Hash)>] ProjectGit data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 126
def create_project_git_with_http_info(id_or_name, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.create_project_git ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.create_project_git" if id_or_name.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling ProjectSCMApi.create_project_git" if name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["name"] = name
  form_params["description"] = opts[:'description'] if !opts[:'description'].nil?
  form_params["mail_enabled"] = opts[:'mail_enabled'] if !opts[:'mail_enabled'].nil?
  form_params["mail_recipients"] = opts[:'mail_recipients'] if !opts[:'mail_recipients'].nil?
  form_params["allow_non_fast_forward"] = opts[:'allow_non_fast_forward'] if !opts[:'allow_non_fast_forward'].nil?
  form_params["default_branch"] = opts[:'default_branch'] if !opts[:'default_branch'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectGit')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#create_project_git\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_project_hg(id_or_name, name, opts = {}) click to toggle source

Create a new hg repository @param id_or_name numeric project id or project name @param name @param [Hash] opts the optional parameters @option opts [String] :description @option opts [String] :mail_recipients @return [ProjectHg]

# File lib/osdn-client/api/project_scm_api.rb, line 250
def create_project_hg(id_or_name, name, opts = {})
  data, _status_code, _headers = create_project_hg_with_http_info(id_or_name, name, opts)
  return data
end
create_project_hg_with_http_info(id_or_name, name, opts = {}) click to toggle source

Create a new hg repository @param id_or_name numeric project id or project name @param name @param [Hash] opts the optional parameters @option opts [String] :description @option opts [String] :mail_recipients @return [Array<(ProjectHg, Fixnum, Hash)>] ProjectHg data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 263
def create_project_hg_with_http_info(id_or_name, name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.create_project_hg ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.create_project_hg" if id_or_name.nil?
  # verify the required parameter 'name' is set
  fail ArgumentError, "Missing the required parameter 'name' when calling ProjectSCMApi.create_project_hg" if name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/hg".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["name"] = name
  form_params["description"] = opts[:'description'] if !opts[:'description'].nil?
  form_params["mail_recipients"] = opts[:'mail_recipients'] if !opts[:'mail_recipients'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectHg')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#create_project_hg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_project_git_hook(id_or_name, repo_id, hook_id, opts = {}) click to toggle source

Delete a Git repository hook @param id_or_name numeric project id or project name @param repo_id @param hook_id @param [Hash] opts the optional parameters @return [nil]

# File lib/osdn-client/api/project_scm_api.rb, line 317
def delete_project_git_hook(id_or_name, repo_id, hook_id, opts = {})
  delete_project_git_hook_with_http_info(id_or_name, repo_id, hook_id, opts)
  return nil
end
delete_project_git_hook_with_http_info(id_or_name, repo_id, hook_id, opts = {}) click to toggle source

Delete a Git repository hook @param id_or_name numeric project id or project name @param repo_id @param hook_id @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 329
def delete_project_git_hook_with_http_info(id_or_name, repo_id, hook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.delete_project_git_hook ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.delete_project_git_hook" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.delete_project_git_hook" if repo_id.nil?
  # verify the required parameter 'hook_id' is set
  fail ArgumentError, "Missing the required parameter 'hook_id' when calling ProjectSCMApi.delete_project_git_hook" if hook_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git/{repo_id}/hooks/{hook_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s).sub('{' + 'hook_id' + '}', hook_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#delete_project_git_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
disable_project_bzr(id_or_name, repo_id, opts = {}) click to toggle source

Disable a bzr repository (not an actual delete, just a shorthand for updating with active=false) @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [ProjectBzr]

# File lib/osdn-client/api/project_scm_api.rb, line 380
def disable_project_bzr(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = disable_project_bzr_with_http_info(id_or_name, repo_id, opts)
  return data
end
disable_project_bzr_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Disable a bzr repository (not an actual delete, just a shorthand for updating with active&#x3D;false) @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [Array<(ProjectBzr, Fixnum, Hash)>] ProjectBzr data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 391
def disable_project_bzr_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.disable_project_bzr ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.disable_project_bzr" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.disable_project_bzr" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/bzr/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectBzr')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#disable_project_bzr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
disable_project_git(id_or_name, repo_id, opts = {}) click to toggle source

Disable a git repository (not an actual delete, just a shorthand for updating with active=false) @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [ProjectGit]

# File lib/osdn-client/api/project_scm_api.rb, line 441
def disable_project_git(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = disable_project_git_with_http_info(id_or_name, repo_id, opts)
  return data
end
disable_project_git_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Disable a git repository (not an actual delete, just a shorthand for updating with active&#x3D;false) @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [Array<(ProjectGit, Fixnum, Hash)>] ProjectGit data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 452
def disable_project_git_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.disable_project_git ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.disable_project_git" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.disable_project_git" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectGit')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#disable_project_git\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
disable_project_hg(id_or_name, repo_id, opts = {}) click to toggle source

Disable a hg repository (not an actual delete, just a shorthand for updating with active=false) @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [ProjectHg]

# File lib/osdn-client/api/project_scm_api.rb, line 502
def disable_project_hg(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = disable_project_hg_with_http_info(id_or_name, repo_id, opts)
  return data
end
disable_project_hg_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Disable a hg repository (not an actual delete, just a shorthand for updating with active&#x3D;false) @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [Array<(ProjectHg, Fixnum, Hash)>] ProjectHg data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 513
def disable_project_hg_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.disable_project_hg ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.disable_project_hg" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.disable_project_hg" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/hg/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectHg')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#disable_project_hg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_project_bzr(id_or_name, repo_id, opts = {}) click to toggle source

Get a bzr repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [ProjectBzr]

# File lib/osdn-client/api/project_scm_api.rb, line 563
def get_project_bzr(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = get_project_bzr_with_http_info(id_or_name, repo_id, opts)
  return data
end
get_project_bzr_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Get a bzr repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [Array<(ProjectBzr, Fixnum, Hash)>] ProjectBzr data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 574
def get_project_bzr_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.get_project_bzr ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.get_project_bzr" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.get_project_bzr" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/bzr/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectBzr')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#get_project_bzr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_project_git(id_or_name, repo_id, opts = {}) click to toggle source

Get a git repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [ProjectGit]

# File lib/osdn-client/api/project_scm_api.rb, line 624
def get_project_git(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = get_project_git_with_http_info(id_or_name, repo_id, opts)
  return data
end
get_project_git_hook(id_or_name, repo_id, hook_id, opts = {}) click to toggle source

Get a repository hook @param id_or_name numeric project id or project name @param repo_id @param hook_id @param [Hash] opts the optional parameters @return [ScmHook]

# File lib/osdn-client/api/project_scm_api.rb, line 686
def get_project_git_hook(id_or_name, repo_id, hook_id, opts = {})
  data, _status_code, _headers = get_project_git_hook_with_http_info(id_or_name, repo_id, hook_id, opts)
  return data
end
get_project_git_hook_with_http_info(id_or_name, repo_id, hook_id, opts = {}) click to toggle source

Get a repository hook @param id_or_name numeric project id or project name @param repo_id @param hook_id @param [Hash] opts the optional parameters @return [Array<(ScmHook, Fixnum, Hash)>] ScmHook data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 698
def get_project_git_hook_with_http_info(id_or_name, repo_id, hook_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.get_project_git_hook ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.get_project_git_hook" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.get_project_git_hook" if repo_id.nil?
  # verify the required parameter 'hook_id' is set
  fail ArgumentError, "Missing the required parameter 'hook_id' when calling ProjectSCMApi.get_project_git_hook" if hook_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git/{repo_id}/hooks/{hook_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s).sub('{' + 'hook_id' + '}', hook_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScmHook')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#get_project_git_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_project_git_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Get a git repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [Array<(ProjectGit, Fixnum, Hash)>] ProjectGit data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 635
def get_project_git_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.get_project_git ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.get_project_git" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.get_project_git" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectGit')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#get_project_git\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_project_hg(id_or_name, repo_id, opts = {}) click to toggle source

Get a hg repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [ProjectHg]

# File lib/osdn-client/api/project_scm_api.rb, line 750
def get_project_hg(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = get_project_hg_with_http_info(id_or_name, repo_id, opts)
  return data
end
get_project_hg_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Get a hg repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [Array<(ProjectHg, Fixnum, Hash)>] ProjectHg data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 761
def get_project_hg_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.get_project_hg ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.get_project_hg" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.get_project_hg" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/hg/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectHg')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#get_project_hg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_project_svn(id_or_name, opts = {}) click to toggle source

Get Subversion repository of the project @param id_or_name numeric project id or project name @param [Hash] opts the optional parameters @return [ProjectSvn]

# File lib/osdn-client/api/project_scm_api.rb, line 810
def get_project_svn(id_or_name, opts = {})
  data, _status_code, _headers = get_project_svn_with_http_info(id_or_name, opts)
  return data
end
get_project_svn_with_http_info(id_or_name, opts = {}) click to toggle source

Get Subversion repository of the project @param id_or_name numeric project id or project name @param [Hash] opts the optional parameters @return [Array<(ProjectSvn, Fixnum, Hash)>] ProjectSvn data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 820
def get_project_svn_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.get_project_svn ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.get_project_svn" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/svn".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectSvn')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#get_project_svn\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_project_bzr(id_or_name, opts = {}) click to toggle source

Get Bazzar repository list @param id_or_name numeric project id or project name @param [Hash] opts the optional parameters @return [Array<ProjectBzr>]

# File lib/osdn-client/api/project_scm_api.rb, line 867
def list_project_bzr(id_or_name, opts = {})
  data, _status_code, _headers = list_project_bzr_with_http_info(id_or_name, opts)
  return data
end
list_project_bzr_with_http_info(id_or_name, opts = {}) click to toggle source

Get Bazzar repository list @param id_or_name numeric project id or project name @param [Hash] opts the optional parameters @return [Array<(Array<ProjectBzr>, Fixnum, Hash)>] Array<ProjectBzr> data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 877
def list_project_bzr_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.list_project_bzr ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.list_project_bzr" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/bzr".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ProjectBzr>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#list_project_bzr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_project_git(id_or_name, opts = {}) click to toggle source

Get git repository list @param id_or_name numeric project id or project name @param [Hash] opts the optional parameters @return [Array<ProjectGit>]

# File lib/osdn-client/api/project_scm_api.rb, line 924
def list_project_git(id_or_name, opts = {})
  data, _status_code, _headers = list_project_git_with_http_info(id_or_name, opts)
  return data
end
list_project_git_hook(id_or_name, repo_id, opts = {}) click to toggle source

Get Git repository hook list @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [Array<ScmHook>]

# File lib/osdn-client/api/project_scm_api.rb, line 982
def list_project_git_hook(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = list_project_git_hook_with_http_info(id_or_name, repo_id, opts)
  return data
end
list_project_git_hook_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Get Git repository hook list @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @return [Array<(Array<ScmHook>, Fixnum, Hash)>] Array<ScmHook> data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 993
def list_project_git_hook_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.list_project_git_hook ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.list_project_git_hook" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.list_project_git_hook" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git/{repo_id}/hooks".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ScmHook>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#list_project_git_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_project_git_with_http_info(id_or_name, opts = {}) click to toggle source

Get git repository list @param id_or_name numeric project id or project name @param [Hash] opts the optional parameters @return [Array<(Array<ProjectGit>, Fixnum, Hash)>] Array<ProjectGit> data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 934
def list_project_git_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.list_project_git ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.list_project_git" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ProjectGit>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#list_project_git\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_project_hg(id_or_name, opts = {}) click to toggle source

Get Mercurial repository list @param id_or_name numeric project id or project name @param [Hash] opts the optional parameters @return [Array<ProjectHg>]

# File lib/osdn-client/api/project_scm_api.rb, line 1042
def list_project_hg(id_or_name, opts = {})
  data, _status_code, _headers = list_project_hg_with_http_info(id_or_name, opts)
  return data
end
list_project_hg_with_http_info(id_or_name, opts = {}) click to toggle source

Get Mercurial repository list @param id_or_name numeric project id or project name @param [Hash] opts the optional parameters @return [Array<(Array<ProjectHg>, Fixnum, Hash)>] Array<ProjectHg> data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 1052
def list_project_hg_with_http_info(id_or_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.list_project_hg ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.list_project_hg" if id_or_name.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/hg".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Array<ProjectHg>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#list_project_hg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_project_bzr(id_or_name, repo_id, opts = {}) click to toggle source

Update a bzr repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @option opts [String] :description @option opts [BOOLEAN] :active @return [ProjectBzr]

# File lib/osdn-client/api/project_scm_api.rb, line 1102
def update_project_bzr(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = update_project_bzr_with_http_info(id_or_name, repo_id, opts)
  return data
end
update_project_bzr_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Update a bzr repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @option opts [String] :description @option opts [BOOLEAN] :active @return [Array<(ProjectBzr, Fixnum, Hash)>] ProjectBzr data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 1115
def update_project_bzr_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.update_project_bzr ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.update_project_bzr" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.update_project_bzr" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/bzr/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["description"] = opts[:'description'] if !opts[:'description'].nil?
  form_params["active"] = opts[:'active'] if !opts[:'active'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectBzr')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#update_project_bzr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_project_git(id_or_name, repo_id, opts = {}) click to toggle source

Update a git repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @option opts [String] :description @option opts [BOOLEAN] :mail_enabled @option opts [String] :mail_recipients @option opts [BOOLEAN] :allow_non_fast_forward @option opts [String] :default_branch @option opts [BOOLEAN] :active @return [ProjectGit]

# File lib/osdn-client/api/project_scm_api.rb, line 1173
def update_project_git(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = update_project_git_with_http_info(id_or_name, repo_id, opts)
  return data
end
update_project_git_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Update a git repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @option opts [String] :description @option opts [BOOLEAN] :mail_enabled @option opts [String] :mail_recipients @option opts [BOOLEAN] :allow_non_fast_forward @option opts [String] :default_branch @option opts [BOOLEAN] :active @return [Array<(ProjectGit, Fixnum, Hash)>] ProjectGit data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 1190
def update_project_git_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.update_project_git ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.update_project_git" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.update_project_git" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/git/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["description"] = opts[:'description'] if !opts[:'description'].nil?
  form_params["mail_enabled"] = opts[:'mail_enabled'] if !opts[:'mail_enabled'].nil?
  form_params["mail_recipients"] = opts[:'mail_recipients'] if !opts[:'mail_recipients'].nil?
  form_params["allow_non_fast_forward"] = opts[:'allow_non_fast_forward'] if !opts[:'allow_non_fast_forward'].nil?
  form_params["default_branch"] = opts[:'default_branch'] if !opts[:'default_branch'].nil?
  form_params["active"] = opts[:'active'] if !opts[:'active'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectGit')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#update_project_git\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_project_hg(id_or_name, repo_id, opts = {}) click to toggle source

Update a hg repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @option opts [String] :description @option opts [String] :mail_recipients @option opts [BOOLEAN] :active @return [ProjectHg]

# File lib/osdn-client/api/project_scm_api.rb, line 1249
def update_project_hg(id_or_name, repo_id, opts = {})
  data, _status_code, _headers = update_project_hg_with_http_info(id_or_name, repo_id, opts)
  return data
end
update_project_hg_with_http_info(id_or_name, repo_id, opts = {}) click to toggle source

Update a hg repository @param id_or_name numeric project id or project name @param repo_id @param [Hash] opts the optional parameters @option opts [String] :description @option opts [String] :mail_recipients @option opts [BOOLEAN] :active @return [Array<(ProjectHg, Fixnum, Hash)>] ProjectHg data, response status code and response headers

# File lib/osdn-client/api/project_scm_api.rb, line 1263
def update_project_hg_with_http_info(id_or_name, repo_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProjectSCMApi.update_project_hg ..."
  end
  # verify the required parameter 'id_or_name' is set
  fail ArgumentError, "Missing the required parameter 'id_or_name' when calling ProjectSCMApi.update_project_hg" if id_or_name.nil?
  # verify the required parameter 'repo_id' is set
  fail ArgumentError, "Missing the required parameter 'repo_id' when calling ProjectSCMApi.update_project_hg" if repo_id.nil?
  # resource path
  local_var_path = "/project/{id_or_name}/hg/{repo_id}".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s).sub('{' + 'repo_id' + '}', repo_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}
  form_params["description"] = opts[:'description'] if !opts[:'description'].nil?
  form_params["mail_recipients"] = opts[:'mail_recipients'] if !opts[:'mail_recipients'].nil?
  form_params["active"] = opts[:'active'] if !opts[:'active'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['oauth2-code', 'oauth2-implicit']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ProjectHg')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProjectSCMApi#update_project_hg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end