-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
source-airtable: upgrade to estuary-cdk
- Loading branch information
1 parent
cdcdf50
commit d279f17
Showing
41 changed files
with
1,008 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import estuary_cdk.pydantic_polyfill # Must be first. | ||
|
||
import asyncio | ||
from estuary_cdk import shim_airbyte_cdk, flow | ||
from source_airtable import SourceAirtable | ||
|
||
asyncio.run( | ||
shim_airbyte_cdk.CaptureShim( | ||
delegate=SourceAirtable(), | ||
oauth2=flow.OAuth2Spec( | ||
provider="airtable", | ||
accessTokenBody=r"grant_type=authorization_code&client_id={{#urlencode}}{{{ client_id }}}{{/urlencode}}&client_secret={{#urlencode}}{{{ client_secret }}}{{/urlencode}}&redirect_uri={{#urlencode}}{{{ redirect_uri }}}{{/urlencode}}&code={{#urlencode}}{{{ code }}}{{/urlencode}}&code_verifier={{#urlencode}}{{{ code_verifier }}}{{/urlencode}}", | ||
authUrlTemplate="https://airtable.com/oauth2/v1/authorize?client_id={{#urlencode}}{{{ client_id }}}{{/urlencode}}&redirect_uri={{#urlencode}}{{{ redirect_uri }}}{{/urlencode}}&response_type=code&state={{#urlencode}}{{{ state }}}{{/urlencode}}&scope=data.records:read%20data.recordComments:read%20schema.bases:read&code_challenge={{#urlencode}}{{{ code_challenge }}}{{/urlencode}}&code_challenge_method={{{ code_challenge_method }}}", | ||
accessTokenHeaders={ | ||
"content-type": "application/x-www-form-urlencoded", | ||
"authorization": "Basic {{#basicauth}}{{{ client_id }}}:{{{client_secret }}}{{/basicauth}}", | ||
}, | ||
accessTokenResponseMap={ | ||
"access_token": "/access_token", | ||
"refresh_token": "/refresh_token", | ||
"token_expiry_date": r"{{#now_plus}}{{ expires_in }}{{/now_plus}}", | ||
}, | ||
accessTokenUrlTemplate="https://airtable.com/oauth2/v1/token", | ||
), | ||
schema_inference=True, | ||
).serve() | ||
) |
66 changes: 0 additions & 66 deletions
66
source-airtable/source_airtable/acceptance-test-config.yml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
source-airtable/source_airtable/integration_tests/__init__.py
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
source-airtable/source_airtable/integration_tests/acceptance.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.