Class: ConnectorsSdk::StubConnector::Connector
Constant Summary
collapse
- SERVICE_TYPE =
'stub_connector'
Instance Method Summary
collapse
#access_token, #authorization_uri, #compare_secrets, #connection_requires_redirect, #download, #extract, #extractor, #refresh, #service_type, #source_status
Instance Method Details
#configurable_fields ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/connectors_sdk/stub_connector/connector.rb', line 20
def configurable_fields
[
{
'key' => 'third_party_url',
'label' => 'Third Party URL'
},
{
'key' => 'third_party_api_key',
'label' => 'Third Party API Key'
}
]
end
|
#deleted(_params) ⇒ Object
53
54
55
|
# File 'lib/connectors_sdk/stub_connector/connector.rb', line 53
def deleted(_params)
[]
end
|
#display_name ⇒ Object
16
17
18
|
# File 'lib/connectors_sdk/stub_connector/connector.rb', line 16
def display_name
'Stub Connector'
end
|
#document_batch(_params) ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/connectors_sdk/stub_connector/connector.rb', line 37
def document_batch(_params)
results = 30.times.map do |i|
{
:action => :create_or_update,
:document => {
:id => "document_#{i}",
:type => 'document',
:body => "contents for document number: #{i}"
},
:download => nil
}
end
[results, {}, true]
end
|
#health_check(_params) ⇒ Object
33
34
35
|
# File 'lib/connectors_sdk/stub_connector/connector.rb', line 33
def health_check(_params)
true
end
|
#permissions(_params) ⇒ Object
57
58
59
|
# File 'lib/connectors_sdk/stub_connector/connector.rb', line 57
def permissions(_params)
[]
end
|