Skip to content
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

feat: api simplification of requestSettings #27

Merged
merged 1 commit into from
Jan 5, 2022
Merged

Conversation

diehbria
Copy link
Contributor

@diehbria diehbria commented Jan 4, 2022

Overview

API work on core

Utilize the originally planned API structure, with settings such as fetchFromStartToEnd, fetchMostRecentBeforeEnd, fetchMostRecentBeforeStart, etc.,

  • run yarn run fix on root, which effected some files which were not properly formatted
  • Alter API to remove the concept of a requestConfig in favor for settings

Legal

This project is available under the Apache 2.0 License.

</select>
<div style={{ width: '400px', height: '500px' }}>
<iot-line-chart
appKit={this.dataModule}
query={AGGREGATED_DATA_QUERY}
viewport={this.viewport}
requestConfig={{ resolution: this.resolution, fetchAggregatedData: true }}
viewport={VIEWPORT}
Copy link
Contributor

@NorbertNader NorbertNader Jan 4, 2022

Choose a reason for hiding this comment

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

Could we leave this as this.viewport? Didn't want it to be static so we can play around with different viewports to test resolution mapping.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, I believe this was an accidental rebase

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will switch this back to this.viewport in my next commit, merged this in to prevent any additional conflicts with the linting

}
};

public subscribeToDataStreamsFrom = (source: string, callback: DataStreamCallback) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the purpose of this? Just a deprecated version of subscribeToDataStreams?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not quite - you can read more about it in https://quip-amazon.com/rFRTAJ7StHtb/IoT-App-Kit but not going to tackle that for initial release

try {
await Promise.all(requests);
} catch (err) {
// NOOP
Copy link
Contributor

@NorbertNader NorbertNader Jan 4, 2022

Choose a reason for hiding this comment

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

Should we do the same for aggregated and latest?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll revisit this one and get back to you on it

@diehbria diehbria merged commit 3d6f458 into main Jan 5, 2022
@diehbria diehbria deleted the api-refactor branch May 5, 2022 16:27
This was referenced Nov 2, 2022
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.

3 participants