HomeGuidesRecipesAPI EndpointsRelease NotesCommunity
Log In
API Endpoints

Search for Twitter connectors

Find connectors by their ID or other object parameters.

Find all of the Twitter connectors that exist in your Layar instance.

🚧

Twitter Connectors Only

The ConnectorApi class only pertains to Twitter connectors, whereas the LiveSourceApi class covers all other available Layar connectors.

Python SDK

Endpoint Method

Authentication

Before running your API calls, remember to authenticate!

Import Dependencies

Make sure at the top of your script you've got the relevant dependencies:

# import dependencies
import layar_api
from layar_api.rest import ApiException
from pprint import pprint

Instantiate API & Make Request

Since there are no input parameters for this endpoint, you can copy this code snippet as is.

# Instantiate API Class
api_instance = layar_api.ConnectorApi(layar_api.ApiClient(configuration))

# Run The API Call
try:
    # Search for Twitter connectors
    api_response = api_instance.search_connectors()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConnectorApi->search_connectors: %s\n" % e)

You're all set to run your script!

📘

Check for Updates

To view the most updated methods for the Layar Python SDK, please review the documentation for the search_connectors endpoint of the ConnectorApi.

Response

You should expect to see a list of Connector objects with each Twitter connectors' details.

For example, below would be the response if the Layar instance (e.g. 'demo.vyasa.com') had connected only two Twitter connectors:

[
{'connector_type': 'TWITTER',
 'created_by_user': 25000,
 'date_indexed': datetime.datetime(2021, 11, 10, 13, 4, 10, 78000, tzinfo=tzutc()),
 'id': 'AX0EzH3jz-8jqgm_ta5d',
 'name': 'Multiple Sclerosis News'},

{'connector_type': 'TWITTER',
 'created_by_user': 25013,
 'date_indexed': datetime.datetime(2019, 10, 18, 15, 40, 12, 21000, tzinfo=tzutc()),
 'id': 'BC3ghrQaM1gR0EVW22Uw',
 'name': 'Colon Cancer Drugs'}
 ]

See the Github Connector object documentation here, or read the Connector Object Properties section below to learn more about the different properties.

Connector Object Properties

Please reference the Cortex Domain Object page for more information about the Connector object.

Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!