-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨Source Google Webfonts: Make Connector Compatible with Builder (#38684)
Co-authored-by: Alexandre Girard <[email protected]>
- Loading branch information
1 parent
2013c61
commit b066af2
Showing
14 changed files
with
174 additions
and
173 deletions.
There are no files selected for viewing
6 changes: 0 additions & 6 deletions
6
airbyte-integrations/connectors/source-google-webfonts/.dockerignore
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-google-webfonts/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# Copyright (c) 2024 Airbyte, Inc., all rights reserved. | ||
# |
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-google-webfonts/integration_tests/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# Copyright (c) 2024 Airbyte, Inc., all rights reserved. | ||
# |
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-google-webfonts/integration_tests/acceptance.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] | |
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
version = "0.1.3" | ||
version = "0.1.4" | ||
name = "source-google-webfonts" | ||
description = "Source implementation for Google Webfonts." | ||
authors = [ "Airbyte <[email protected]>",] | ||
|
1 change: 0 additions & 1 deletion
1
airbyte-integrations/connectors/source-google-webfonts/requirements.txt
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-google-webfonts/source_google_webfonts/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
294 changes: 161 additions & 133 deletions
294
airbyte-integrations/connectors/source-google-webfonts/source_google_webfonts/manifest.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,148 +1,176 @@ | ||
version: "0.29.0" | ||
version: 0.78.1 | ||
|
||
type: DeclarativeSource | ||
|
||
check: | ||
type: CheckStream | ||
stream_names: | ||
- fonts | ||
|
||
definitions: | ||
selector: | ||
extractor: | ||
field_path: ["items"] | ||
requester: | ||
url_base: "https://webfonts.googleapis.com/v1" | ||
http_method: "GET" | ||
streams: | ||
fonts: | ||
type: DeclarativeStream | ||
name: fonts | ||
retriever: | ||
type: SimpleRetriever | ||
requester: | ||
$ref: "#/definitions/base_requester" | ||
path: >- | ||
/webfonts?key={{ config['api_key'] }}&sort={{ config['sort'] or | ||
'SORT_UNDEFINED'}}&prettyPrint={{ config['prettyPrint'] or | ||
'true'}}&alt={{ config['alt'] or 'json'}} | ||
http_method: GET | ||
record_selector: | ||
type: RecordSelector | ||
extractor: | ||
type: DpathExtractor | ||
field_path: | ||
- items | ||
schema_loader: | ||
type: InlineSchemaLoader | ||
schema: | ||
$ref: "#/schemas/fonts" | ||
base_requester: | ||
type: HttpRequester | ||
url_base: https://webfonts.googleapis.com/v1 | ||
authenticator: | ||
type: ApiKeyAuthenticator | ||
header: "apikey" | ||
api_token: "{{ config['api_key'] }}" | ||
inject_into: | ||
type: RequestOption | ||
inject_into: header | ||
field_name: apikey | ||
|
||
retriever: | ||
record_selector: | ||
$ref: "#/definitions/selector" | ||
paginator: | ||
type: NoPagination | ||
requester: | ||
$ref: "#/definitions/requester" | ||
streams: | ||
- $ref: "#/definitions/streams/fonts" | ||
|
||
base_stream: | ||
retriever: | ||
$ref: "#/definitions/retriever" | ||
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 | ||
description: >- | ||
API key is required to access google apis, For getting your's goto | ||
google console and generate api key for Webfonts | ||
order: 0 | ||
alt: | ||
type: string | ||
description: Optional, Available params- json, media, proto | ||
order: 1 | ||
prettyPrint: | ||
type: string | ||
description: Optional, boolean type | ||
order: 2 | ||
sort: | ||
type: string | ||
description: Optional, to find how to sort | ||
order: 3 | ||
additionalProperties: true | ||
|
||
fonts_stream: | ||
$ref: "#/definitions/base_stream" | ||
$parameters: | ||
name: "fonts" | ||
path: | ||
"/webfonts?key={{ config['api_key'] }}&sort={{ config['sort'] or 'SORT_UNDEFINED'}}&prettyPrint={{ | ||
config['prettyPrint'] or 'true'}}&alt={{ config['alt'] or 'json'}}" | ||
metadata: | ||
autoImportSchema: | ||
fonts: false | ||
|
||
schema_loader: | ||
type: InlineSchemaLoader | ||
schema: | ||
definitions: {} | ||
$schema: http://json-schema.org/draft-07/schema# | ||
$id: https://example.com/object1666796406.json | ||
title: Root | ||
type: object | ||
properties: | ||
kind: | ||
description: The API resource kind, always set to 'webfonts#webfontList' | ||
$id: "#root/kind" | ||
title: Kind | ||
type: string | ||
default: "" | ||
pattern: ^.*$ | ||
items: | ||
description: List of fonts available in the API | ||
$id: "#root/items" | ||
title: Items | ||
type: array | ||
default: [] | ||
items: | ||
$id: "#root/items/items" | ||
title: Items | ||
schemas: | ||
fonts: | ||
type: object | ||
$id: https://example.com/object1666796406.json | ||
$schema: http://json-schema.org/draft-07/schema# | ||
additionalProperties: true | ||
properties: | ||
items: | ||
type: array | ||
$id: "#root/items" | ||
default: [] | ||
description: List of fonts available in the API | ||
items: | ||
type: object | ||
$id: "#root/items/items" | ||
properties: | ||
version: | ||
type: string | ||
$id: "#root/items/items/version" | ||
description: Version of the font data | ||
pattern: ^.*$ | ||
title: Version | ||
category: | ||
type: string | ||
$id: "#root/items/items/category" | ||
description: The category the font belongs to (e.g. 'sans-serif', 'serif') | ||
pattern: ^.*$ | ||
title: Category | ||
family: | ||
type: string | ||
$id: "#root/items/items/family" | ||
description: The name of the font family (e.g. 'Roboto', 'Open Sans') | ||
pattern: ^.*$ | ||
title: Family | ||
files: | ||
type: object | ||
$id: "#root/items/items/files" | ||
description: Different file variants available for the font | ||
properties: | ||
family: | ||
description: The name of the font family (e.g. 'Roboto', 'Open Sans') | ||
$id: "#root/items/items/family" | ||
title: Family | ||
type: string | ||
default: "" | ||
pattern: ^.*$ | ||
variants: | ||
description: Different styles and weights available for the font | ||
$id: "#root/items/items/variants" | ||
title: Variants | ||
type: array | ||
default: [] | ||
items: | ||
$id: "#root/items/items/variants/items" | ||
title: Items | ||
type: string | ||
default: "" | ||
pattern: ^.*$ | ||
subsets: | ||
description: List of language subsets supported by the font | ||
$id: "#root/items/items/subsets" | ||
title: Subsets | ||
type: array | ||
default: [] | ||
items: | ||
$id: "#root/items/items/subsets/items" | ||
title: Items | ||
type: string | ||
default: "" | ||
pattern: ^.*$ | ||
version: | ||
description: Version of the font data | ||
$id: "#root/items/items/version" | ||
title: Version | ||
italic: | ||
type: string | ||
default: "" | ||
$id: "#root/items/items/files/italic" | ||
description: URL to the italic font file | ||
pattern: ^.*$ | ||
lastModified: | ||
description: Timestamp of the last modification date of the font | ||
$id: "#root/items/items/lastModified" | ||
title: Lastmodified | ||
title: Italic | ||
regular: | ||
type: string | ||
default: "" | ||
$id: "#root/items/items/files/regular" | ||
description: URL to the regular font file | ||
pattern: ^.*$ | ||
files: | ||
description: Different file variants available for the font | ||
$id: "#root/items/items/files" | ||
title: Files | ||
type: object | ||
properties: | ||
regular: | ||
description: URL to the regular font file | ||
$id: "#root/items/items/files/regular" | ||
title: Regular | ||
type: string | ||
default: "" | ||
pattern: ^.*$ | ||
italic: | ||
description: URL to the italic font file | ||
$id: "#root/items/items/files/italic" | ||
title: Italic | ||
type: string | ||
default: "" | ||
pattern: ^.*$ | ||
category: | ||
description: | ||
The category the font belongs to (e.g. 'sans-serif', | ||
'serif') | ||
$id: "#root/items/items/category" | ||
title: Category | ||
type: string | ||
default: "" | ||
pattern: ^.*$ | ||
kind: | ||
description: The resource kind, should always be 'webfonts#webfont' | ||
$id: "#root/items/items/kind" | ||
title: Kind | ||
type: string | ||
default: "" | ||
pattern: ^.*$ | ||
streams: | ||
- "#/definitions/fonts_stream" | ||
|
||
check: | ||
stream_names: | ||
- "fonts" | ||
title: Regular | ||
title: Files | ||
kind: | ||
type: string | ||
$id: "#root/items/items/kind" | ||
description: The resource kind, should always be 'webfonts#webfont' | ||
pattern: ^.*$ | ||
title: Kind | ||
lastModified: | ||
type: string | ||
$id: "#root/items/items/lastModified" | ||
description: Timestamp of the last modification date of the font | ||
pattern: ^.*$ | ||
title: Lastmodified | ||
subsets: | ||
type: array | ||
$id: "#root/items/items/subsets" | ||
default: [] | ||
description: List of language subsets supported by the font | ||
items: | ||
type: string | ||
$id: "#root/items/items/subsets/items" | ||
pattern: ^.*$ | ||
title: Items | ||
title: Subsets | ||
variants: | ||
type: array | ||
$id: "#root/items/items/variants" | ||
default: [] | ||
description: Different styles and weights available for the font | ||
items: | ||
type: string | ||
$id: "#root/items/items/variants/items" | ||
pattern: ^.*$ | ||
title: Items | ||
title: Variants | ||
title: Items | ||
title: Items | ||
kind: | ||
type: string | ||
$id: "#root/kind" | ||
description: The API resource kind, always set to 'webfonts#webfontList' | ||
pattern: ^.*$ | ||
title: Kind | ||
title: Root |
5 changes: 3 additions & 2 deletions
5
airbyte-integrations/connectors/source-google-webfonts/source_google_webfonts/run.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-google-webfonts/source_google_webfonts/source.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.