Skip to content

Commit

Permalink
source-news-api: Make manifest work in builder (airbytehq#25554)
Browse files Browse the repository at this point in the history
* make manifest work in builder

* revert

* prepare release

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
2 people authored and marcosmarxm committed Jun 8, 2023
1 parent 0476a3e commit 0b0e94b
Show file tree
Hide file tree
Showing 10 changed files with 280 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19017,7 +19017,7 @@
"sourceDefinitionId": "df38991e-f35b-4af2-996d-36817f614587",
"name": "News API",
"dockerRepository": "airbyte/source-news-api",
"dockerImageTag": "0.1.0",
"dockerImageTag": "0.1.1",
"documentationUrl": "https://docs.airbyte.com/integrations/sources/news-api",
"icon": "newsapi.svg",
"sourceType": "api",
Expand Down Expand Up @@ -19077,13 +19077,15 @@
},
"start_date": {
"type": "string",
"description": "A date and optional time for the oldest article allowed. This should\nbe in ISO 8601 format (e.g. 2021-01-01 or 2021-01-01T12:00:00).\n",
"description": "A date and optional time for the oldest article allowed. This should\nbe in ISO 8601 format.\n",
"examples": [ "2021-01-01", "2021-01-01T12:00:00" ],
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2})?$",
"order": 6
},
"end_date": {
"type": "string",
"description": "A date and optional time for the newest article allowed. This should\nbe in ISO 8601 format (e.g. 2021-01-01 or 2021-01-01T12:00:00).\n",
"description": "A date and optional time for the newest article allowed. This should\nbe in ISO 8601 format.\n",
"examples": [ "2021-01-01", "2021-01-01T12:00:00" ],
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2})?$",
"order": 7
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@
- name: News API
sourceDefinitionId: df38991e-f35b-4af2-996d-36817f614587
dockerRepository: airbyte/source-news-api
dockerImageTag: 0.1.0
dockerImageTag: 0.1.1
documentationUrl: https://docs.airbyte.com/integrations/sources/news-api
icon: newsapi.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10038,7 +10038,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-news-api:0.1.0"
- dockerImage: "airbyte/source-news-api:0.1.1"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/news-api"
connectionSpecification:
Expand Down Expand Up @@ -10102,13 +10102,19 @@
start_date:
type: "string"
description: "A date and optional time for the oldest article allowed. This\
\ should\nbe in ISO 8601 format (e.g. 2021-01-01 or 2021-01-01T12:00:00).\n"
\ should\nbe in ISO 8601 format.\n"
examples:
- "2021-01-01"
- "2021-01-01T12:00:00"
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2})?$"
order: 6
end_date:
type: "string"
description: "A date and optional time for the newest article allowed. This\
\ should\nbe in ISO 8601 format (e.g. 2021-01-01 or 2021-01-01T12:00:00).\n"
\ should\nbe in ISO 8601 format.\n"
examples:
- "2021-01-01"
- "2021-01-01T12:00:00"
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2})?$"
order: 7
language:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-news-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ COPY source_news_api ./source_news_api
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.version=0.1.1
LABEL io.airbyte.name=airbyte/source-news-api
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
connector_image: airbyte/source-news-api:dev
tests:
spec:
- spec_path: "source_news_api/spec.yaml"
- spec_path: "integration_tests/spec.yaml"
connection:
- config_path: "secrets/config.json"
status: "succeed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,40 @@ definitions:
name: "everything"
primary_key: "publishedAt"
path: "/everything"
schema_loader:
type: InlineSchemaLoader
schema:
"$schema": http://json-schema.org/draft-07/schema#
type: object
properties:
title:
type:
- 'null'
- string
author:
type:
- 'null'
- string
publishedAt:
type:
- 'null'
- string
format: date-time
source:
type: object
properties:
Name:
type:
- 'null'
- string
Id:
type:
- 'null'
- string
url:
type:
- 'null'
- string
top_headlines_stream:
$ref: "#/definitions/base_stream"
$parameters:
Expand All @@ -62,6 +96,40 @@ definitions:
path: "/top-headlines"
use_country: true
use_category: true
schema_loader:
type: InlineSchemaLoader
schema:
"$schema": http://json-schema.org/draft-07/schema#
type: object
properties:
title:
type:
- 'null'
- string
author:
type:
- 'null'
- string
publishedAt:
type:
- 'null'
- string
format: date-time
source:
type: object
properties:
Name:
type:
- 'null'
- string
Id:
type:
- 'null'
- string
url:
type:
- 'null'
- string

streams:
- "#/definitions/everything_stream"
Expand All @@ -71,3 +139,197 @@ check:
stream_names:
- "everything"
- "top_headlines"

spec:
type: Spec
documentation_url: https://docs.airbyte.com/integrations/sources/news-api
connection_specification:
$schema: http://json-schema.org/draft-07/schema#
title: News Api Spec
type: object
required:
- api_key
- country
- category
- sort_by
additionalProperties: true
properties:
api_key:
type: string
description: API Key
airbyte_secret: true
order: 0
search_query:
type: string
description: |
Search query. See https://newsapi.org/docs/endpoints/everything for
information.
examples:
- "+bitcoin OR +crypto"
- "sunak AND (truss OR johnson)"
order: 1
search_in:
type: array
description: |
Where to apply search query. Possible values are: title, description,
content.
items:
type: string
enum:
- title
- description
- content
order: 2
sources:
type: array
description: |
Identifiers (maximum 20) for the news sources or blogs you want
headlines from. Use the `/sources` endpoint to locate these
programmatically or look at the sources index:
https://newsapi.com/sources. Will override both country and category.
items:
type: string
order: 3
domains:
type: array
description: |
A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com,
engadget.com) to restrict the search to.
items:
type: string
order: 4
exclude_domains:
type: array
description: |
A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com,
engadget.com) to remove from the results.
items:
type: string
order: 5
start_date:
type: string
description: |
A date and optional time for the oldest article allowed. This should
be in ISO 8601 format.
examples:
- "2021-01-01"
- "2021-01-01T12:00:00"
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2})?$"
order: 6
end_date:
type: string
description: |
A date and optional time for the newest article allowed. This should
be in ISO 8601 format.
examples:
- "2021-01-01"
- "2021-01-01T12:00:00"
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2})?$"
order: 7
language:
type: string
description: |
The 2-letter ISO-639-1 code of the language you want to get headlines
for. Possible options: ar de en es fr he it nl no pt ru se ud zh.
enum:
- ar
- de
- en
- es
- fr
- he
- it
- nl
- no
- pt
- ru
- se
- ud
- zh
order: 8
country:
type: string
description: |
The 2-letter ISO 3166-1 code of the country you want to get headlines
for. You can't mix this with the sources parameter.
enum:
- ae
- ar
- at
- au
- be
- bg
- br
- ca
- ch
- cn
- co
- cu
- cz
- de
- eg
- fr
- gb
- gr
- hk
- hu
- id
- ie
- il
- in
- it
- jp
- kr
- lt
- lv
- ma
- mx
- my
- ng
- nl
- no
- nz
- ph
- pl
- pt
- ro
- rs
- ru
- sa
- se
- sg
- si
- sk
- th
- tr
- tw
- ua
- us
- ve
- za
default: us
order: 9
category:
type: string
description: The category you want to get top headlines for.
enum:
- business
- entertainment
- general
- health
- science
- sports
- technology
default: business
order: 10
sort_by:
type: string
description: |
The order to sort the articles in. Possible options: relevancy,
popularity, publishedAt.
enum:
- relevancy
- popularity
- publishedAt
default: publishedAt
order: 11

This file was deleted.

0 comments on commit 0b0e94b

Please sign in to comment.