HomeGuidesRecipesAPI EndpointsRelease NotesCommunity
Log In
API Endpoints

Get Twitter connector details

Get details about a specific Twitter connector.

🚧

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

The only input you will need to provide in the request body is the id, which is the Layar ID for the connector you're interested in getting the details for. To find this ID programmatically, you can use the search_connectors endpoint.

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

# Provide Parameters for Request Body
id = 'id_example' # Layar ID for the Connector

# Run the get_connector API call
try:
    api_response = api_instance.get_connector(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ConnectorApi->get_connector: %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 get_connector endpoint of the ConnectorApi.

Response

You should expect to see a list of different properties associated with the Twitter Connector you identified in the request body.

Here is an example response:

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

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
Authorization
OAuth2
Click Try It! to start a request and see the response here!