Skip to content

Conversation

@sophatsam
Copy link

Hi @bennettgo! This is the latest connector for Autodesk Construction Cloud. It is a relatively simple API with just GET calls to the API. There is no public documentation but I can share the documentation with you. I wanted to get this PR on your radar and will send you an email with more details.

svchandra and others added 30 commits August 26, 2019 19:03
… output `hub_id`, `project_id`, and `container_id`
…output `hub_id`, `project_id`, and `folder_id`
…le_content` in `PUT` payload, output `hub_id` and `project_id`
…ameters, output `hub_id`, `projct_id`, and `item_id` in result
…put `hub_id`, `project_id`, and `item_id` in result
end
end
end
end,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash.

properties.where(['modelVersionId = ?', model_id]).first['properties'].map do |property|
[ property.dig('name'),
"#{property['id']}_#{property['name']}_#{property['unit']}_#{property['dataType']}_#{property['type']}_#{property['source']}"
]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineArrayBraceLayout: Closing array brace must be on the same line as the last array element when opening brace is on the same line as the first array element.

properties = get("/api/v1/powerbi/projects/#{project_id}/properties")
properties.where(['modelVersionId = ?', model_id]).first['properties'].map do |property|
[ property.dig('name'),
"#{property['id']}_#{property['name']}_#{property['unit']}_#{property['dataType']}_#{property['type']}_#{property['source']}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [139/80]

if model_id.present? && model_id.slice(0,1) != '#'
properties = get("/api/v1/powerbi/projects/#{project_id}/properties")
properties.where(['modelVersionId = ?', model_id]).first['properties'].map do |property|
[ property.dig('name'),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.
Layout/TrailingWhitespace: Trailing whitespace detected.

if project_id.present? && project_id.slice(0,1) != '#'
if model_id.present? && model_id.slice(0,1) != '#'
properties = get("/api/v1/powerbi/projects/#{project_id}/properties")
properties.where(['modelVersionId = ?', model_id]).first['properties'].map do |property|
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [98/80]

end,

sample_output: lambda do |_connection, input|
project = input['project_id'] || get("/api/v1/powerbi/projects")&.dig(0, 'id') || {}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [92/80]

{ name: 'records' },
{ name: 'rows', type: 'array', of: 'object',
properties: object_definitions['grid_data']
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineHashBraceLayout: Closing hash brace must be on the same line as the last hash element when opening brace is on the same line as the first hash element.

output_fields: lambda do |object_definitions|
[
{ name: 'records' },
{ name: 'rows', type: 'array', of: 'object',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/TrailingWhitespace: Trailing whitespace detected.

end

post("/api/v1/powerbi/projects/#{input['project_id']}/versiongriddata/#{input['model_id']}")
.request_body(properties.to_json)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Use 2 (not 16) spaces for indenting an expression spanning multiple lines.

properties = input['properties_define']
end

post("/api/v1/powerbi/projects/#{input['project_id']}/versiongriddata/#{input['model_id']}")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [100/80]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants