Skip to content

Commit

Permalink
source-savvycal contribution from natikgadzhi (#45069)
Browse files Browse the repository at this point in the history
  • Loading branch information
natikgadzhi authored Sep 1, 2024
1 parent 34eb16d commit c0e629f
Show file tree
Hide file tree
Showing 6 changed files with 295 additions and 0 deletions.
33 changes: 33 additions & 0 deletions airbyte-integrations/connectors/source-savvycal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SavvyCal
This directory contains the manifest-only connector for `source-savvycal`.

Sync your scheduled meetings and scheduling links from SavvyCal!

## Usage
There are multiple ways to use this connector:
- You can use this connector as any other connector in Airbyte Marketplace.
- You can load this connector in `pyairbyte` using `get_source`!
- You can open this connector in Connector Builder, edit it, and publish to your workspaces.

Please refer to the manifest-only connector documentation for more details.

## Local Development
We recommend you use the Connector Builder to edit this connector.

But, if you want to develop this connector locally, you can use the following steps.

### Environment Setup
You will need `airbyte-ci` installed. You can find the documentation [here](airbyte-ci).

### Build
This will create a dev image (`source-savvycal:dev`) that you can use to test the connector locally.
```bash
airbyte-ci connectors --name=source-savvycal build
```

### Test
This will run the acceptance tests for the connector.
```bash
airbyte-ci connectors --name=source-savvycal test
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-savvycal:dev
acceptance_tests:
spec:
tests:
- spec_path: "manifest.yaml"
connection:
bypass_reason: "This is a builder contribution, and we do not have secrets at this time"
discovery:
bypass_reason: "This is a builder contribution, and we do not have secrets at this time"
basic_read:
bypass_reason: "This is a builder contribution, and we do not have secrets at this time"
incremental:
bypass_reason: "This is a builder contribution, and we do not have secrets at this time"
full_refresh:
bypass_reason: "This is a builder contribution, and we do not have secrets at this time"
1 change: 1 addition & 0 deletions airbyte-integrations/connectors/source-savvycal/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
183 changes: 183 additions & 0 deletions airbyte-integrations/connectors/source-savvycal/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
version: 4.6.2

type: DeclarativeSource

description: Sync your scheduled meetings and scheduling links from SavvyCal!

check:
type: CheckStream
stream_names:
- events

definitions:
streams:
events:
type: DeclarativeStream
name: events
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /v1/events
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- entries
paginator:
type: DefaultPaginator
page_token_option:
type: RequestOption
inject_into: request_parameter
field_name: after
pagination_strategy:
type: CursorPagination
cursor_value: "{{ response.metadata.after }}"
stop_condition: "{{ response.metadata.after is none }}"
transformations:
- type: AddFields
fields:
- path:
- scheduler_name
value: '{{ record["scheduler"]["display_name"] }}'
- type: AddFields
fields:
- path:
- scheduler_email
value: '{{ record["scheduler"]["email"] }}'
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/events"
scheduling_links:
type: DeclarativeStream
name: scheduling_links
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /v1/links
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- entries
paginator:
type: DefaultPaginator
page_token_option:
type: RequestOption
inject_into: request_parameter
field_name: after
pagination_strategy:
type: CursorPagination
cursor_value: "{{ response.metadata.after }}"
stop_condition: "{{ response.metadata.after is none }}"
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/scheduling_links"
timezones:
type: DeclarativeStream
name: timezones
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /v1/time_zones
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path: []
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/timezones"
base_requester:
type: HttpRequester
url_base: https://api.savvycal.com
authenticator:
type: BearerAuthenticator
api_token: '{{ config["api_key"] }}'

streams:
- $ref: "#/definitions/streams/events"
- $ref: "#/definitions/streams/scheduling_links"
- $ref: "#/definitions/streams/timezones"

spec:
type: Spec
connection_specification:
type: object
$schema: http://json-schema.org/draft-07/schema#
required:
- api_key
properties:
api_key:
type: string
description: >-
Go to SavvyCal → Settings → Developer → Personal Tokens and make a new
token. Then, copy the private key. https://savvycal.com/developers
name: api_key
order: 0
title: API Key
airbyte_secret: true
additionalProperties: true

metadata:
autoImportSchema:
events: false
scheduling_links: false
timezones: false
testedStreams:
events:
streamHash: 983fbfcd76c950fb5a2e529e77be8c8cb53153a6
hasResponse: true
responsesAreSuccessful: true
hasRecords: true
primaryKeysArePresent: true
primaryKeysAreUnique: true
scheduling_links:
streamHash: 41c519374dbff290916742ae064487485e0043e3
hasResponse: true
responsesAreSuccessful: true
hasRecords: true
primaryKeysArePresent: true
primaryKeysAreUnique: true
timezones:
streamHash: e0aa739a05ae7c75ffc6d8e624102c52241d9744
hasResponse: true
responsesAreSuccessful: true
hasRecords: true
primaryKeysArePresent: true
primaryKeysAreUnique: true
assist:
docsUrl: https://savvycal.com/docs/api/

schemas:
events:
type: object
$schema: http://json-schema.org/draft-07/schema#
additionalProperties: true
properties: {}
scheduling_links:
type: object
$schema: http://json-schema.org/draft-07/schema#
additionalProperties: true
properties: {}
timezones:
type: object
$schema: http://json-schema.org/draft-07/schema#
additionalProperties: true
properties: {}
35 changes: 35 additions & 0 deletions airbyte-integrations/connectors/source-savvycal/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
metadataSpecVersion: "1.0"
data:
allowedHosts:
hosts:
- api.savvycal.com
registryOverrides:
oss:
enabled: true
cloud:
enabled: true
remoteRegistries:
pypi:
enabled: false
packageName: airbyte-source-savvycal
connectorBuildOptions:
baseImage: docker.io/airbyte/source-declarative-manifest:4.6.2@sha256:f5fcd3d4703b7590b6166a7853c5ed1686731607cd30a159a8c24e2fe2c1ee98
connectorSubtype: api
connectorType: source
definitionId: a554ed06-74e2-4c60-9510-d63f7dc463b6
dockerImageTag: 0.0.1
dockerRepository: airbyte/source-savvycal
githubIssueLabel: source-savvycal
icon: icon.svg
license: MIT
name: SavvyCal
releaseDate: 2024-09-01
releaseStage: alpha
supportLevel: community
documentationUrl: https://docs.airbyte.com/integrations/sources/savvycal
tags:
- language:manifest-only
- cdk:low-code
ab_internal:
ql: 100
sl: 100
26 changes: 26 additions & 0 deletions docs/integrations/sources/savvycal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SavvyCal
Sync your scheduled meetings and scheduling links from SavvyCal!

## Configuration

| Input | Type | Description | Default Value |
|-------|------|-------------|---------------|
| `api_key` | `string` | API Key. Go to SavvyCal → Settings → Developer → Personal Tokens and make a new token. Then, copy the private key. https://savvycal.com/developers | |

## Streams
| Stream Name | Primary Key | Pagination | Supports Full Sync | Supports Incremental |
|-------------|-------------|------------|---------------------|----------------------|
| events | id | DefaultPaginator |||
| scheduling_links | id | DefaultPaginator |||
| timezones | id | No pagination |||

## Changelog

<details>
<summary>Expand to review</summary>

| Version | Date | Subject |
|------------------|------------|----------------|
| 0.0.1 | 2024-09-01 | Initial release by [@natikgadzhi](https://github.com/natikgadzhi) via Connector Builder|

</details>

0 comments on commit c0e629f

Please sign in to comment.