-
Notifications
You must be signed in to change notification settings - Fork 52
Assemble connector #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Assemble connector #108
Conversation
…_id` is dynamic value
…ntainer_id` in result
…` and `container_id` in result
… output `hub_id`, `project_id`, and `container_id`
…d` and `container_id`
…` and `container_id`
… and `folder_id`
…output `hub_id`, `project_id`, and `folder_id`
…le_content` in `PUT` payload, output `hub_id` and `project_id`
…t_id`, and `folder_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, |
There was a problem hiding this comment.
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']}" | ||
| ] |
There was a problem hiding this comment.
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']}" |
There was a problem hiding this comment.
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'), |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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') || {} |
There was a problem hiding this comment.
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'] | ||
| } |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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']}") |
There was a problem hiding this comment.
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]
Hi @bennettgo! This is the latest connector for Autodesk Construction Cloud. It is a relatively simple API with just
GETcalls 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.