Method: GoodData::Project#blueprint

Defined in:
lib/gooddata/models/project.rb

#blueprint(options = {}) ⇒ GoodData::ProjectRole

Gets project blueprint from the server

Returns:

  • Project role if found



849
850
851
852
853
854
855
856
857
858
# File 'lib/gooddata/models/project.rb', line 849

def blueprint(options = {})
  options = { include_ca: true }.merge(options)
  result = client.get("/gdc/projects/#{pid}/model/view", params: { includeDeprecated: true, includeGrain: true, includeCA: options[:include_ca] })

  polling_url = result['asyncTask']['link']['poll']
  model = client.poll_on_code(polling_url, options)
  bp = GoodData::Model::FromWire.from_wire(model, options)
  bp.title = title
  bp
end