Class: Mogura::Project::Delete

Inherits:
Object
  • Object
show all
Defined in:
lib/mogura/project.rb

Class Method Summary collapse

Class Method Details

.project(id:) ⇒ Object



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/mogura/project.rb', line 83

def project(id:)
  uri = URI.parse("#{Mogura.config.endpoint}/api/projects/#{id}")
  request = Net::HTTP::Delete.new(uri)
  req_options = {
    use_ssl: uri.scheme == "https",
  }
  Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
    http.request(request)
  end

end