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

breaking: Make the API browser more generic #24

Merged
merged 1 commit into from
Jul 5, 2019

Conversation

childish-sambino
Copy link
Contributor

Drops the 'version' grouping and adds HTTP method/operation names.

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

Drops the 'version' grouping and adds HTTP method/operation names.
@childish-sambino childish-sambino changed the title Make the API browser more generic breaking: Make the API browser more generic Jul 4, 2019
Copy link
Contributor

@thinkingserious thinkingserious left a comment

Choose a reason for hiding this comment

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

😎

file? Have a mode of operation where it just picks the most recent version?

*/
const OPERATIONS = ['post', 'get', 'delete'];
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to support patch?

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 right now. Nor put.

const { doesObjectHaveProperty } = require('../javascript-utilities');
const ResourcePathParser = require('../resource-path-parser');
const { camelCase } = require('../naming-conventions');
let apiSpec; // Lazy-loaded below.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why lazy-load here, don't we always need the apiSpec? If so, loading it up front might be best so that during operations there are no delays. Or are you preparing for cases where we can allow users to just provide a subset of the full Twilio apiSpec for leaner operations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lazy so it's only done if needed and only happens once. May optimize later to not need it all the time.

@childish-sambino childish-sambino merged commit 7c9961c into master Jul 5, 2019
@childish-sambino childish-sambino deleted the browser-version branch July 5, 2019 19:17
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.

None yet

2 participants