From 5bd9dc9d7d3fba4cded5b11d92866d3bfcd9e175 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Wed, 22 Mar 2023 18:03:12 +0100 Subject: [PATCH 1/9] Source Strava: http -> https --- .../integration_tests/configured_catalog.json | 4 +- .../sample_files/configured_catalog.json | 38 ------------------- .../source_strava/schemas/activities.json | 2 +- .../source_strava/schemas/athlete_stats.json | 2 +- .../source-strava/source_strava/spec.json | 2 +- 5 files changed, 5 insertions(+), 43 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-strava/sample_files/configured_catalog.json diff --git a/airbyte-integrations/connectors/source-strava/integration_tests/configured_catalog.json b/airbyte-integrations/connectors/source-strava/integration_tests/configured_catalog.json index 8212e5aae740..f32b3c66e6db 100644 --- a/airbyte-integrations/connectors/source-strava/integration_tests/configured_catalog.json +++ b/airbyte-integrations/connectors/source-strava/integration_tests/configured_catalog.json @@ -4,7 +4,7 @@ "stream": { "name": "athlete_stats", "json_schema": { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "type": "object", "properties": { "athlete_id": { @@ -21,7 +21,7 @@ "stream": { "name": "activities", "json_schema": { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "type": "object", "properties": { "start_date": { diff --git a/airbyte-integrations/connectors/source-strava/sample_files/configured_catalog.json b/airbyte-integrations/connectors/source-strava/sample_files/configured_catalog.json deleted file mode 100644 index 8212e5aae740..000000000000 --- a/airbyte-integrations/connectors/source-strava/sample_files/configured_catalog.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "streams": [ - { - "stream": { - "name": "athlete_stats", - "json_schema": { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "properties": { - "athlete_id": { - "type": "integer" - } - } - }, - "supported_sync_modes": ["full_refresh"] - }, - "sync_mode": "full_refresh", - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "activities", - "json_schema": { - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "properties": { - "start_date": { - "type": "string" - } - } - }, - "supported_sync_modes": ["full_refresh", "incremental"] - }, - "sync_mode": "incremental", - "destination_sync_mode": "append" - } - ] -} diff --git a/airbyte-integrations/connectors/source-strava/source_strava/schemas/activities.json b/airbyte-integrations/connectors/source-strava/source_strava/schemas/activities.json index 023c03bf18ca..57d35ae30820 100644 --- a/airbyte-integrations/connectors/source-strava/source_strava/schemas/activities.json +++ b/airbyte-integrations/connectors/source-strava/source_strava/schemas/activities.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": true, "properties": { diff --git a/airbyte-integrations/connectors/source-strava/source_strava/schemas/athlete_stats.json b/airbyte-integrations/connectors/source-strava/source_strava/schemas/athlete_stats.json index 76b337ac224e..9abb1bdb3dd2 100644 --- a/airbyte-integrations/connectors/source-strava/source_strava/schemas/athlete_stats.json +++ b/airbyte-integrations/connectors/source-strava/source_strava/schemas/athlete_stats.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": true, "properties": { diff --git a/airbyte-integrations/connectors/source-strava/source_strava/spec.json b/airbyte-integrations/connectors/source-strava/source_strava/spec.json index 7c86deaf2bc6..99e602544645 100644 --- a/airbyte-integrations/connectors/source-strava/source_strava/spec.json +++ b/airbyte-integrations/connectors/source-strava/source_strava/spec.json @@ -1,7 +1,7 @@ { "documentationUrl": "https://docs.airbyte.com/integrations/sources/strava", "connectionSpecification": { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "https://json-schema.org/draft-07/schema#", "title": "Strava Spec", "type": "object", "required": [ From 1132b19d44871b9a6a2c70977d697bd3b9eb33a4 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Wed, 22 Mar 2023 18:03:19 +0100 Subject: [PATCH 2/9] Source Strava: update docs --- docs/integrations/sources/strava.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/integrations/sources/strava.md b/docs/integrations/sources/strava.md index 952b77615f98..95144ab98e6a 100644 --- a/docs/integrations/sources/strava.md +++ b/docs/integrations/sources/strava.md @@ -1,5 +1,3 @@ -# - # Strava This page guides you through the process of setting up the Strava source connector. @@ -92,7 +90,16 @@ Follow these steps to get the required credentials and inputs: 6. Click `Set up source`. -## Supported streams and sync modes +## Supported sync modes + +The Strava source connector supports the following [sync modes](https://docs.airbyte.com/cloud/core-concepts#connection-sync-modes): + +- [Full Refresh - Overwrite](https://docs.airbyte.com/understanding-airbyte/connections/full-refresh-overwrite/) +- [Full Refresh - Append](https://docs.airbyte.com/understanding-airbyte/connections/full-refresh-append) +- [Incremental Sync - Append](https://docs.airbyte.com/understanding-airbyte/connections/incremental-append) +- [Incremental Sync - Deduped History](https://docs.airbyte.com/understanding-airbyte/connections/incremental-deduped-history) + +## Supported streams * [Athlete Stats](https://developers.strava.com/docs/reference/#api-Athletes-getStats) * [Activities](https://developers.strava.com/docs/reference/#api-Activities-getLoggedInAthleteActivities) \(Incremental\) From c2f58820029ec8b7cd4b6408ec0bf379f6b75469 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Wed, 22 Mar 2023 18:06:37 +0100 Subject: [PATCH 3/9] Source Strava: update docs --- docs/integrations/sources/strava.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/integrations/sources/strava.md b/docs/integrations/sources/strava.md index 95144ab98e6a..c4788cdbe991 100644 --- a/docs/integrations/sources/strava.md +++ b/docs/integrations/sources/strava.md @@ -1,6 +1,11 @@ # Strava -This page guides you through the process of setting up the Strava source connector. +This page guides you through the process of setting up the Strava source connector. + +## Prerequisites + +Scopes: +* `activity:read_all` ## Setup guide ### Step 1: Set up Strava From fec8af5fa44634b6bcaf0f91a38afd714a478540 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Wed, 22 Mar 2023 18:24:28 +0100 Subject: [PATCH 4/9] Source Strava: update docs --- docs/integrations/sources/strava.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/integrations/sources/strava.md b/docs/integrations/sources/strava.md index c4788cdbe991..fe894ab156aa 100644 --- a/docs/integrations/sources/strava.md +++ b/docs/integrations/sources/strava.md @@ -19,9 +19,9 @@ Follow these steps to get the required credentials and inputs: * Continue to follow the instructions from the doc above to obtain `client_id` and `client_secret` * `refresh_token` * Enter this URL into your browser (make sure to add your `client_id` from previous step: - * `http://www.strava.com/oauth/authorize?client_id=[REPLACE_WITH_YOUR_CLIENT_ID]&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=activity:read_all` + * `https://www.strava.com/oauth/authorize?client_id=[REPLACE_WITH_YOUR_CLIENT_ID]&response_type=code&redirect_uri=https://localhost/exchange_token&approval_prompt=force&scope=activity:read_all` * Authorize through the UI - * Browser will redirect you to an empty page with a URL similar to `http://localhost/exchange_token?state=&code=b55003496d87a9f0b694ca1680cd5690d27d9d28&scope=activity:read_all` + * Browser will redirect you to an empty page with a URL similar to `https://localhost/exchange_token?state=&code=b55003496d87a9f0b694ca1680cd5690d27d9d28&scope=activity:read_all` * Copy the authorization code above (in this example it would be `b55003496d87a9f0b694ca1680cd5690d27d9d28`) * Make a cURL request to exchange the authorization code and scope for a refresh token: * ``` From 229feec88ee9614ba17710f79c908197f0169481 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Wed, 22 Mar 2023 19:51:08 +0100 Subject: [PATCH 5/9] Source Strava: add allowed hosts --- .../init/src/main/resources/seed/source_definitions.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 9401676cf27c..20eb8198d9ee 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -1950,7 +1950,10 @@ documentationUrl: https://docs.airbyte.com/integrations/sources/strava icon: strava.svg sourceType: api - releaseStage: alpha + releaseStage: beta + allowedHosts: + hosts: + - strava.com - name: Statuspage sourceDefinitionId: 74cbd708-46c3-4512-9c93-abd5c3e9a94d dockerRepository: airbyte/source-statuspage From 9096bbf90fb0dbeeb72f03753f1604351eb90eb7 Mon Sep 17 00:00:00 2001 From: artem1205 Date: Wed, 22 Mar 2023 19:10:10 +0000 Subject: [PATCH 6/9] Automated Change --- connectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectors.md b/connectors.md index f0e44b94673f..3fb54c621c4f 100644 --- a/connectors.md +++ b/connectors.md @@ -225,7 +225,7 @@ | **SpaceX API** | SpaceX API icon | Source | airbyte/source-spacex-api:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/spacex-api) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-spacex-api) | `62235e65-af7a-4138-9130-0bda954eb6a8` | | **Square** | Square icon | Source | airbyte/source-square:0.2.1 | beta | [link](https://docs.airbyte.com/integrations/sources/square) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-square) | `77225a51-cd15-4a13-af02-65816bd0ecf4` | | **Statuspage** | Statuspage icon | Source | airbyte/source-statuspage:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/statuspage) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-statuspage) | `74cbd708-46c3-4512-9c93-abd5c3e9a94d` | -| **Strava** | Strava icon | Source | airbyte/source-strava:0.1.3 | alpha | [link](https://docs.airbyte.com/integrations/sources/strava) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-strava) | `7a4327c4-315a-11ec-8d3d-0242ac130003` | +| **Strava** | Strava icon | Source | airbyte/source-strava:0.1.3 | beta | [link](https://docs.airbyte.com/integrations/sources/strava) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-strava) | `7a4327c4-315a-11ec-8d3d-0242ac130003` | | **Stripe** | Stripe icon | Source | airbyte/source-stripe:3.0.3 | generally_available | [link](https://docs.airbyte.com/integrations/sources/stripe) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-stripe) | `e094cb9a-26de-4645-8761-65c0c425d1de` | | **SurveyCTO** | SurveyCTO icon | Source | airbyte/source-surveycto:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/surveycto) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-surveycto) | `dd4632f4-15e0-4649-9b71-41719fb1fdee` | | **SurveyMonkey** | SurveyMonkey icon | Source | airbyte/source-surveymonkey:0.1.15 | generally_available | [link](https://docs.airbyte.com/integrations/sources/surveymonkey) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-surveymonkey) | `badc5925-0485-42be-8caa-b34096cb71b5` | From f87cf56a11921a2ab183c2b1f12038c3e0bfb555 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Thu, 23 Mar 2023 18:48:58 +0100 Subject: [PATCH 7/9] Source Strava: add date-time format --- .../connectors/source-strava/source_strava/spec.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-strava/source_strava/spec.json b/airbyte-integrations/connectors/source-strava/source_strava/spec.json index 99e602544645..cbe4dc14645f 100644 --- a/airbyte-integrations/connectors/source-strava/source_strava/spec.json +++ b/airbyte-integrations/connectors/source-strava/source_strava/spec.json @@ -57,7 +57,8 @@ "type": "string", "description": "UTC date and time. Any data before this date will not be replicated.", "title": "Start Date", - "examples": ["2016-12-31 23:59:59"], + "examples": ["2021-03-01T00:00:00Z"], + "format": "date-time", "order": 4 } } From f611fe8af91b2a7516494a99b73d25eef39a78be Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants Date: Thu, 23 Mar 2023 18:50:00 +0100 Subject: [PATCH 8/9] Source Strava: add date-time format --- airbyte-integrations/connectors/source-strava/Dockerfile | 2 +- docs/integrations/sources/strava.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-strava/Dockerfile b/airbyte-integrations/connectors/source-strava/Dockerfile index c9424677a484..9bedb7afde30 100644 --- a/airbyte-integrations/connectors/source-strava/Dockerfile +++ b/airbyte-integrations/connectors/source-strava/Dockerfile @@ -34,5 +34,5 @@ COPY source_strava ./source_strava ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.3 +LABEL io.airbyte.version=0.1.4 LABEL io.airbyte.name=airbyte/source-strava diff --git a/docs/integrations/sources/strava.md b/docs/integrations/sources/strava.md index fe894ab156aa..2d8669942f8d 100644 --- a/docs/integrations/sources/strava.md +++ b/docs/integrations/sources/strava.md @@ -118,6 +118,7 @@ More information about Strava rate limits and adjustments to those limits can be | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------| +| 0.1.4 | 2023-03-23 | [24368](https://github.com/airbytehq/airbyte/pull/24368) | Add date-time format for input | | 0.1.3 | 2023-03-15 | [24101](https://github.com/airbytehq/airbyte/pull/24101) | certified to beta, fixed spec, fixed SAT, added unit tests | | 0.1.2 | 2021-12-15 | [8799](https://github.com/airbytehq/airbyte/pull/8799) | Implement OAuth 2.0 support | | 0.1.1 | 2021-12-06 | [8425](https://github.com/airbytehq/airbyte/pull/8425) | Update title, description fields in spec | From 80e985ba3e6e66c57127d327add894547b4d84e8 Mon Sep 17 00:00:00 2001 From: Octavia Squidington III Date: Thu, 23 Mar 2023 18:49:44 +0000 Subject: [PATCH 9/9] auto-bump connector version --- .../init/src/main/resources/seed/source_definitions.yaml | 2 +- .../init/src/main/resources/seed/source_specs.yaml | 7 ++++--- connectors.md | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 20eb8198d9ee..eb18fa136489 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -1946,7 +1946,7 @@ - sourceDefinitionId: 7a4327c4-315a-11ec-8d3d-0242ac130003 name: Strava dockerRepository: airbyte/source-strava - dockerImageTag: 0.1.3 + dockerImageTag: 0.1.4 documentationUrl: https://docs.airbyte.com/integrations/sources/strava icon: strava.svg sourceType: api diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index ba5945e8fe5c..2dd7be418588 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -14768,11 +14768,11 @@ path_in_connector_config: - "credentials" - "client_secret" -- dockerImage: "airbyte/source-strava:0.1.3" +- dockerImage: "airbyte/source-strava:0.1.4" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/strava" connectionSpecification: - $schema: "http://json-schema.org/draft-07/schema#" + $schema: "https://json-schema.org/draft-07/schema#" title: "Strava Spec" type: "object" required: @@ -14828,7 +14828,8 @@ description: "UTC date and time. Any data before this date will not be replicated." title: "Start Date" examples: - - "2016-12-31 23:59:59" + - "2021-03-01T00:00:00Z" + format: "date-time" order: 4 supportsNormalization: false supportsDBT: false diff --git a/connectors.md b/connectors.md index 3fb54c621c4f..145fb047a68c 100644 --- a/connectors.md +++ b/connectors.md @@ -225,7 +225,7 @@ | **SpaceX API** | SpaceX API icon | Source | airbyte/source-spacex-api:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/spacex-api) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-spacex-api) | `62235e65-af7a-4138-9130-0bda954eb6a8` | | **Square** | Square icon | Source | airbyte/source-square:0.2.1 | beta | [link](https://docs.airbyte.com/integrations/sources/square) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-square) | `77225a51-cd15-4a13-af02-65816bd0ecf4` | | **Statuspage** | Statuspage icon | Source | airbyte/source-statuspage:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/statuspage) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-statuspage) | `74cbd708-46c3-4512-9c93-abd5c3e9a94d` | -| **Strava** | Strava icon | Source | airbyte/source-strava:0.1.3 | beta | [link](https://docs.airbyte.com/integrations/sources/strava) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-strava) | `7a4327c4-315a-11ec-8d3d-0242ac130003` | +| **Strava** | Strava icon | Source | airbyte/source-strava:0.1.4 | beta | [link](https://docs.airbyte.com/integrations/sources/strava) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-strava) | `7a4327c4-315a-11ec-8d3d-0242ac130003` | | **Stripe** | Stripe icon | Source | airbyte/source-stripe:3.0.3 | generally_available | [link](https://docs.airbyte.com/integrations/sources/stripe) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-stripe) | `e094cb9a-26de-4645-8761-65c0c425d1de` | | **SurveyCTO** | SurveyCTO icon | Source | airbyte/source-surveycto:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/sources/surveycto) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-surveycto) | `dd4632f4-15e0-4649-9b71-41719fb1fdee` | | **SurveyMonkey** | SurveyMonkey icon | Source | airbyte/source-surveymonkey:0.1.15 | generally_available | [link](https://docs.airbyte.com/integrations/sources/surveymonkey) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/source-surveymonkey) | `badc5925-0485-42be-8caa-b34096cb71b5` |