Execution
Basic Example (Direct Execution)
params = {
"owner": "gdp-admin",
"author": "samuellusandi",
"per_page": 1,
}
data = connector.execute("github", "search_commits", token=user_token, input_=params)
print(data)Alternative Approach (Fluent Interface)
params = {
"owner": "gdp-admin",
"author": "samuellusandi",
"per_page": 1,
}
github = connector.connect('github')
response = github.action('list_pull_requests')\
.params(params)\
.max_attempts(3)\
.token('user-token')\
.run() # Execute and return ActionResponse for advanced data handling
# Get initial data
initial_data = response.get_data()
# Iterate the following next pages
while response.has_next():
response = response.next_page(
data = response.get_data()
# Process data here
# You can also navigate backwards
while response.has_prev():
response = response.prev_page()
data = response.get_data()
# Process data here
# Execute multiple independent actions using the same connector instance
commits_response = github.action('list_commits')\
.params({
'owner': 'GDP-ADMIN',
'repo': 'gl-connectors',
'page': 1,
'per_page': 10
})\
.token('user-token')\
.run()Working with Files using ConnectorFile
Uploading Files
Downloading Files
Last updated
Was this helpful?