@kapa.ai
YAML
version: 6.48.15
type: DeclarativeSource
check:
type: CheckStream
stream_names:
- events
- event-guests
definitions:
streams:
events:
type: DeclarativeStream
name: events
primary_key:
- api_id
schema_loader:
type: InlineSchemaLoader
schema:
$ref: "#/schemas/events"
stream_slicer:
type: DatetimeBasedCursor
cursor_field: start_at
datetime_format: "%Y-%m-%dT%H:%M:%SZ"
cursor_granularity: PT1S
step: P30D
lookback_window: PT0S
start_datetime:
type: ConfigDatetime
field_name: start_date
start_time_option:
type: RequestOption
inject_into: request_parameter
field_name: start_at
end_time_option:
type: RequestOption
inject_into: request_parameter
field_name: end_at
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /calendar/list-events
http_method: GET
request_timeout: 180
request_parameters:
calendar_id: "{{ config['calendar_id'] }}"
limit: "{{ config['page_size'] | default('100') }}"
error_handler:
type: DefaultErrorHandler
max_retries: 3
response_filters:
- type: HttpResponseFilter
http_codes:
- 408
- 429
- 500
- 502
- 503
- 504
- 524
action: RETRY
backoff_strategies:
- type: ExponentialBackoffStrategy
base_interval_in_seconds: 30
max_interval_in_seconds: 300
paginator:
type: DefaultPaginator
page_token_option:
type: RequestOption
inject_into: request_parameter
field_name: pagination_cursor
pagination_strategy:
type: CursorPagination
cursor_value: "{{ response.get('next_cursor') }}"
stop_condition: >-
{{ not response.get('has_more') or not response.get('next_cursor')
}}
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- entries
- "*"
- event
decoder:
type: JsonDecoder
event-guests:
type: DeclarativeStream
name: event-guests
primary_key:
- api_id
schema_loader:
type: InlineSchemaLoader
schema:
type: object
additionalProperties: true
required:
- api_id
properties:
api_id:
type: string
event_api_id:
type: string
event_start_at:
type: string
format: date-time
approval_status:
type:
- string
- "null"
avatar_url:
type:
- string
- "null"
created_at:
type:
- string
- "null"
format: date-time
email:
type:
- string
- "null"
linkedin_url:
type:
- string
- "null"
name:
type:
- string
- "null"
twitter_url:
type:
- string
- "null"
updated_at:
type:
- string
- "null"
format: date-time
retriever:
type: SimpleRetriever
requester:
$ref: "#/definitions/base_requester"
path: /event/get-guests
http_method: GET
request_timeout: 180
request_parameters:
event_api_id: "{{ stream_slice.get('event_api_id', '') }}"
pagination_limit: "{{ config['page_size'] | default('100') }}"
error_handler:
type: DefaultErrorHandler
max_retries: 3
response_filters:
- type: HttpResponseFilter
http_codes:
- 408
- 429
- 500
- 502
- 503
- 504
- 524
action: RETRY
backoff_strategies:
- type: ExponentialBackoffStrategy
base_interval_in_seconds: 30
max_interval_in_seconds: 300
stream_slicer:
type: SubstreamSlicer
parent_stream_configs:
- type: ParentStreamConfig
stream:
$ref: "#/definitions/streams/events"
parent_key: api_id
partition_field: event_api_id
record_selector:
type: RecordSelector
extractor:
type: DpathExtractor
field_path:
- entries
- "*"
- guest
decoder:
type: JsonDecoder
transformations:
- type: AddFields
fields:
- path:
- event_api_id
value: "{{ stream_slice.get('event_api_id', '') }}"
- path:
- event_start_at
value: "{{ stream_slice.get('event_start_at', '') }}"
base_requester:
type: HttpRequester
url_base:
https://public-api.lu.ma/public/v1
authenticator:
type: ApiKeyAuthenticator
api_token: "{{ config['api_key'] }}"
inject_into:
type: RequestOption
field_name: x-luma-api-key
inject_into: header
streams:
- $ref: "#/definitions/streams/events"
- $ref: "#/definitions/streams/event-guests"
spec:
type: Spec
connection_specification:
type: object
$schema:
http://json-schema.org/draft-07/schema#
required:
- api_key
- calendar_id
- start_date
properties:
api_key:
type: string
title: Luma API Key
airbyte_secret: true
order: 0
calendar_id:
type: string
description: Your Luma calendar ID
title: Calendar ID
order: 1
start_date:
type: string
description: Start date for syncing events in YYYY-MM-DDTHH
mmssZ format.
title: Start Date
format: date-time
examples:
- "2024-01-01T00
0000Z"
order: 2
page_size:
type: integer
description: Number of records to fetch per API request page.
title: Page Size
default: 100
minimum: 1
maximum: 1000
order: 3
additionalProperties: true
metadata:
autoImportSchema:
events: false
event-guests: false
testedStreams:
events:
streamHash: ba62e37f21812a97dc88ec5ca8d5fe889dc18390
hasResponse: true
responsesAreSuccessful: true
hasRecords: true
primaryKeysArePresent: true
primaryKeysAreUnique: true
event-guests:
streamHash: 1a8927833a724815c26fd153fdfd688f3bb39d0d
hasResponse: true
responsesAreSuccessful: false
hasRecords: false
primaryKeysArePresent: true
primaryKeysAreUnique: true
assist: {}
schemas:
events:
type: object
additionalProperties: true
required:
- api_id
properties:
description:
type:
- string
- "null"
api_id:
type: string
start_at:
type: string
format: date-time
cover_url:
type:
- string
- "null"
end_at:
type:
- string
- "null"
format: date-time
event_type:
type:
- string
- "null"
location_type:
type:
- string
- "null"
name:
type:
- string
- "null"
timezone:
type:
- string
- "null"
url:
type:
- string
- "null"
event-guests:
type: object
additionalProperties: true
required:
- api_id
properties:
api_id:
type: string
event_api_id:
type: string
event_start_at:
type: string
format: date-time
approval_status:
type:
- string
- "null"
avatar_url:
type:
- string
- "null"
created_at:
type:
- string
- "null"
format: date-time
email:
type:
- string
- "null"
linkedin_url:
type:
- string
- "null"
name:
type:
- string
- "null"
twitter_url:
type:
- string
- "null"
updated_at:
type:
- string
- "null"
format: date-time
EVENTS STREAM RESPONSE