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

🎉 New Source: Newsdata [low-code CDK] #18576

Merged
merged 13 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
89 changes: 89 additions & 0 deletions airbyte-config/init/src/main/resources/icons/newsdata.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,13 @@
documentationUrl: https://docs.airbyte.com/integrations/sources/news-api
sourceType: api
releaseStage: alpha
- name: Newsdata
sourceDefinitionId: 60bd11d8-2632-4daa-a688-b47336d32093
dockerRepository: airbyte/source-newsdata
dockerImageTag: 0.1.0
documentationUrl: https://docs.airbyte.com/integrations/sources/newsdata
sourceType: api
releaseStage: alpha
- name: Notion
sourceDefinitionId: 6e00b415-b02e-4160-bf02-58176a0ae687
dockerRepository: airbyte/source-notion
Expand Down
205 changes: 205 additions & 0 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8924,6 +8924,211 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-newsdata:0.1.0"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/newsdata"
connectionSpecification:
$schema: "http://json-schema.org/draft-07/schema#"
title: "Newsdata Spec"
type: "object"
required:
- "api_key"
additionalProperties: true
properties:
api_key:
type: "string"
description: "API Key"
airbyte_secret: true
order: 0
OneOf:
query:
type: "string"
description: "Keywords or phrases to search for in the news title and\
\ content. Advanced Search options:\n - Search `Social`: query = \"\
social\"\n - Search `Social Pizza`: query = \"social pizza\"\n - Search\
\ `Social` but not with `pizza`: query = \"social -pizza\"\n - Search\
\ `Social` but not with `pizza` and `wildfire`: query = \"social -pizza\
\ -wildfire\"\n - Search `Social` and `pizza`: query = \"social AND\
\ pizza\"\n - Search `Social` and `pizza` and `pasta`: query = \"social\
\ AND pizza AND pasta\"\n - Search `Social` or `pizza`: query = \"\
social OR pizza\"\n - Search `Social` or `pizza` but not `pasta`: query\
\ = \"social OR pizza -pasta\"\n - Search `Social` or `pizza` or `pasta`:\
\ query = \"social OR pizza OR pasta\"\nNote: You can't use AND and\
\ OR in the same query."
order: 1
query_in_title:
type: "string"
description: "Same as `query`, but restricting the search to only the\
\ news title. It cannot be used along with `query`."
order: 1
domain:
type: "array"
description: "Domains (maximum 5) to restrict the search to. Use the sources\
\ stream to find top sources id."
maxitems: 5
items:
type: "string"
order: 2
country:
type: "array"
description: "2-letter ISO 3166-1 countries (maximum 5) to restrict the\
\ search to."
maxitems: 5
order: 3
items:
type: "string"
enum:
- "ar"
- "au"
- "at"
- "bd"
- "by"
- "be"
- "br"
- "bg"
- "ca"
- "cl"
- "cn"
- "co"
- "cr"
- "cu"
- "cz"
- "dk"
- "do"
- "ec"
- "eg"
- "ee"
- "et"
- "fi"
- "fr"
- "de"
- "gr"
- "hk"
- "hu"
- "in"
- "id"
- "iq"
- "ie"
- "il"
- "it"
- "jp"
- "kz"
- "kw"
- "lv"
- "lb"
- "lt"
- "my"
- "mx"
- "ma"
- "mm"
- "nl"
- "nz"
- "ng"
- "kp"
- "no"
- "pk"
- "pe"
- "ph"
- "pl"
- "pt"
- "pr"
- "ro"
- "ru"
- "sa"
- "rs"
- "sg"
- "sk"
- "si"
- "za"
- "kr"
- "es"
- "se"
- "ch"
- "tw"
- "tz"
- "th"
- "tr"
- "ua"
- "ae"
- "gb"
- "us"
- "ve"
- "vi"
category:
type: "array"
description: "Categories (maximum 5) to restrict the search to."
maxitems: 5
order: 4
items:
type: "string"
enum:
- "business"
- "entertainment"
- "environment"
- "food"
- "health"
- "politics"
- "science"
- "sports"
- "technology"
- "top"
- "world"
language:
type: "array"
description: "Languages (maximum 5) to restrict the search to."
maxitems: 5
order: 5
items:
type: "string"
enum:
- "be"
- "am"
- "ar"
- "bn"
- "bs"
- "bg"
- "my"
- "ckb"
- "zh"
- "hr"
- "cs"
- "da"
- "nl"
- "en"
- "et"
- "fi"
- "fr"
- "de"
- "el"
- "he"
- "hi"
- "hu"
- "in"
- "it"
- "jp"
- "ko"
- "lv"
- "lt"
- "ms"
- "no"
- "pl"
- "pt"
- "ro"
- "ru"
- "sr"
- "sk"
- "sl"
- "es"
- "sw"
- "sv"
- "th"
- "tr"
- "uk"
- "ur"
- "vi"
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-notion:0.1.10"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/notion"
Expand Down
6 changes: 6 additions & 0 deletions airbyte-integrations/connectors/source-newsdata/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*
!Dockerfile
!main.py
!source_newsdata
!setup.py
!secrets
38 changes: 38 additions & 0 deletions airbyte-integrations/connectors/source-newsdata/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM python:3.9.11-alpine3.15 as base

# build and load all requirements
FROM base as builder
WORKDIR /airbyte/integration_code

# upgrade pip to the latest version
RUN apk --no-cache upgrade \
&& pip install --upgrade pip \
&& apk --no-cache add tzdata build-base


COPY setup.py ./
# install necessary packages to a temporary folder
RUN pip install --prefix=/install .

# build a clean environment
FROM base
WORKDIR /airbyte/integration_code

# copy all loaded and built libraries to a pure basic image
COPY --from=builder /install /usr/local
# add default timezone settings
COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN echo "Etc/UTC" > /etc/timezone

# bash is installed for more convenient debugging.
RUN apk --no-cache add bash

# copy payload code only
COPY main.py ./
COPY source_newsdata ./source_newsdata

ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.0
LABEL io.airbyte.name=airbyte/source-newsdata
Loading