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

source-tinyemail contribution from ombhardwajj #48031

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions airbyte-integrations/connectors/source-tinyemail/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Tinyemail
This directory contains the manifest-only connector for `source-tinyemail`.

Tinyemail is an email marketing tool.
We can extract data from campaigns and contacts streams using this connector.
Docs : https://docs.tinyemail.com/docs/tiny-email/tinyemail

## 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-tinyemail:dev`) that you can use to test the connector locally.
```bash
airbyte-ci connectors --name=source-tinyemail build
```

### Test
This will run the acceptance tests for the connector.
```bash
airbyte-ci connectors --name=source-tinyemail 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-tinyemail: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-tinyemail/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
260 changes: 260 additions & 0 deletions airbyte-integrations/connectors/source-tinyemail/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
version: 5.15.0

type: DeclarativeSource

description: |-
Tinyemail is an email marketing tool.
We can extract data from campaigns and contacts streams using this connector.
Docs : https://docs.tinyemail.com/docs/tiny-email/tinyemail

check:
type: CheckStream
stream_names:
- campaigns

definitions:
streams:
campaigns:
type: DeclarativeStream
name: campaigns
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: campaign
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- campaigns
- content
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/campaigns"
contacts:
type: DeclarativeStream
name: contacts
primary_key:
- id
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: contacts
http_method: GET
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- contacts
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/contacts"
base_requester:
type: HttpRequester
url_base: https://api.tinyemail.com/v1/
authenticator:
type: ApiKeyAuthenticator
inject_into:
type: RequestOption
inject_into: header
field_name: X-API-KEY
api_token: "{{ config[\"api_key\"] }}"

streams:
- $ref: "#/definitions/streams/campaigns"
- $ref: "#/definitions/streams/contacts"

spec:
type: Spec
connection_specification:
type: object
$schema: http://json-schema.org/draft-07/schema#
required:
- api_key
properties:
api_key:
type: string
title: API Key
airbyte_secret: true
order: 0
additionalProperties: true

metadata:
autoImportSchema:
campaigns: true
contacts: true
testedStreams:
campaigns:
streamHash: d3acabfc9dc25d75a335b63848f1b6df4e7f199a
hasResponse: true
responsesAreSuccessful: true
hasRecords: true
primaryKeysArePresent: true
primaryKeysAreUnique: true
contacts:
streamHash: abece08aa245b26686fd883cc3320886c9e78990
hasResponse: true
responsesAreSuccessful: true
hasRecords: true
primaryKeysArePresent: true
primaryKeysAreUnique: true
assist: {}

schemas:
campaigns:
type: object
$schema: http://json-schema.org/schema#
additionalProperties: true
properties:
bounced:
type:
- number
- "null"
bouncedProgress:
type:
- number
- "null"
campaign:
type:
- object
- "null"
properties:
name:
type:
- string
- "null"
previewText:
type:
- string
- "null"
subject:
type:
- string
- "null"
clicked:
type:
- number
- "null"
clickedProgress:
type:
- number
- "null"
contactIds:
type:
- array
- "null"
items:
type:
- string
- "null"
delivered:
type:
- number
- "null"
deliveredProgress:
type:
- number
- "null"
id:
type: string
open:
type:
- number
- "null"
openProgress:
type:
- number
- "null"
requests:
type:
- number
- "null"
schedule:
type:
- object
- "null"
properties:
dateTime:
type:
- string
- "null"
senderId:
type:
- string
- "null"
sent:
type:
- number
- "null"
spam:
type:
- number
- "null"
spamProgress:
type:
- number
- "null"
status:
type:
- string
- "null"
template:
type:
- object
- "null"
properties:
html:
type:
- string
- "null"
totalClicked:
type:
- number
- "null"
totalClickedProgress:
type:
- number
- "null"
totalOpen:
type:
- number
- "null"
totalOpenProgress:
type:
- number
- "null"
unsubscribed:
type:
- number
- "null"
unsubscribedProgress:
type:
- number
- "null"
required:
- id
contacts:
type: object
$schema: http://json-schema.org/schema#
additionalProperties: true
properties:
id:
type: string
name:
type:
- string
- "null"
numberOfMembers:
type:
- number
- "null"
required:
- id
35 changes: 35 additions & 0 deletions airbyte-integrations/connectors/source-tinyemail/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
metadataSpecVersion: "1.0"
data:
allowedHosts:
hosts:
- "api.tinyemail.com"
registryOverrides:
oss:
enabled: true
cloud:
enabled: true
remoteRegistries:
pypi:
enabled: false
packageName: airbyte-source-tinyemail
connectorBuildOptions:
baseImage: docker.io/airbyte/source-declarative-manifest:5.17.0@sha256:9c6bfd080a247b7781ce5b25687e7c44e29d31315d0bf656584b38810521bbaa
connectorSubtype: api
connectorType: source
definitionId: 08f1a92c-eaa6-47f5-8d22-035184434315
dockerImageTag: 0.0.1
dockerRepository: airbyte/source-tinyemail
githubIssueLabel: source-tinyemail
icon: icon.svg
license: MIT
name: Tinyemail
releaseDate: 2024-10-31
releaseStage: alpha
supportLevel: community
documentationUrl: https://docs.airbyte.com/integrations/sources/tinyemail
tags:
- language:manifest-only
- cdk:low-code
ab_internal:
ql: 100
sl: 100
27 changes: 27 additions & 0 deletions docs/integrations/sources/tinyemail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Tinyemail
Tinyemail is an email marketing tool.
We can extract data from campaigns and contacts streams using this connector.
Docs : https://docs.tinyemail.com/docs/tiny-email/tinyemail

## Configuration

| Input | Type | Description | Default Value |
|-------|------|-------------|---------------|
| `api_key` | `string` | API Key. | |

## Streams
| Stream Name | Primary Key | Pagination | Supports Full Sync | Supports Incremental |
|-------------|-------------|------------|---------------------|----------------------|
| campaigns | id | No pagination | ✅ | ❌ |
| contacts | id | No pagination | ✅ | ❌ |

## Changelog

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

| Version | Date | Pull Request | Subject |
|------------------|-------------------|--------------|----------------|
| 0.0.1 | 2024-10-31 | | Initial release by [@ombhardwajj](https://github.com/ombhardwajj) via Connector Builder |

</details>
Loading