Class: Mogura::Project::Get

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

Class Method Summary collapse

Class Method Details

.projectObject

Raises:

  • (NotImplementedError)


19
20
21
22
# File 'lib/mogura/project.rb', line 19

def project
  # https://docs.digdag.io/api/
  raise NotImplementedError, "You must implement #{self.name}##{__method__}"
end

.projectsObject



13
14
15
16
17
# File 'lib/mogura/project.rb', line 13

def projects
  uri = URI.parse("#{Mogura.config.endpoint}/api/projects")
  response = Net::HTTP.get_response(uri)
  JSON.parse(response.body)
end