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

Abstracing 'Patch' and 'Put' in a single 'Update' function #3

Closed
nicolasnascimento opened this issue Sep 2, 2020 · 1 comment · Fixed by #9
Closed

Abstracing 'Patch' and 'Put' in a single 'Update' function #3

nicolasnascimento opened this issue Sep 2, 2020 · 1 comment · Fixed by #9
Assignees
Milestone

Comments

@nicolasnascimento
Copy link
Collaborator

The Airtable API provides two ways in which one can update a record, PATCH (not all fields) and PUT (all fields). I think deciding which type of operation to perform should be decided by the library and made abstract to library users.

I propose making 'patch' and 'put' (offered by the API, but not available in the library yet) private and creating a general 'update' function which decides which of these operation to perform.

This change appears to be feasible and not too time consuming.

@rafaelruwer rafaelruwer added this to the Version 1 milestone Sep 2, 2020
@nicolasnascimento
Copy link
Collaborator Author

I was reading the docs for Airtable API and apparently now you can update all fields using a PATCH operation.
The difference is that PUT is Destructive and replaces the entire row.
Given that, I think this now is a matter of renaming the method to update

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 a pull request may close this issue.

2 participants