All URIs are relative to https://api.sparkfly.com
Method | HTTP request | Description |
---|---|---|
create_event | POST /v1.0/events | Creates an event |
delete_event | DELETE /v1.0/events/{event_id} | Delete the event |
get_event | GET /v1.0/events/{event_id} | Get event by ID |
get_events | GET /v1.0/events | get all events |
update_event_name | PUT /v1.0/events/{event_id} | Change the name of an event |
EventResponse create_event(event_input_request=event_input_request)
Creates an event
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.event_input_request import EventInputRequest
from sparkfly_client.models.event_response import EventResponse
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.EventsApi(api_client)
event_input_request = sparkfly_client.EventInputRequest() # EventInputRequest | Event to add to system (optional)
try:
# Creates an event
api_response = api_instance.create_event(event_input_request=event_input_request)
print("The response of EventsApi->create_event:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EventsApi->create_event: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
event_input_request | EventInputRequest | Event to add to system | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Successful creation | * Cache-Control - * Content-Length - * Content-Type - * Date - * Etag - * Location - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
400 | Error parsing request | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_event(event_id)
Delete the event
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.EventsApi(api_client)
event_id = 56 # int | The id of the event
try:
# Delete the event
api_instance.delete_event(event_id)
except Exception as e:
print("Exception when calling EventsApi->delete_event: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
event_id | int | The id of the event |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful deletion | * Cache-Control - * Content-Length - * Content-Type - * Date - * Etag - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
404 | Event was not found by id | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventResponse get_event(event_id)
Get event by ID
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.event_response import EventResponse
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.EventsApi(api_client)
event_id = 56 # int | The id of the event
try:
# Get event by ID
api_response = api_instance.get_event(event_id)
print("The response of EventsApi->get_event:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EventsApi->get_event: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
event_id | int | The id of the event |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful retrieval of event | * Cache-Control - * Content-Length - * Content-Type - * Date - * Etag - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventList get_events()
get all events
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.event_list import EventList
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.EventsApi(api_client)
try:
# get all events
api_response = api_instance.get_events()
print("The response of EventsApi->get_events:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EventsApi->get_events: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful retrieval of events | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventResponse update_event_name(event_id, event_input_request=event_input_request)
Change the name of an event
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.event_input_request import EventInputRequest
from sparkfly_client.models.event_response import EventResponse
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.EventsApi(api_client)
event_id = 56 # int | The id of the event
event_input_request = sparkfly_client.EventInputRequest() # EventInputRequest | The object that passes the updated name (optional)
try:
# Change the name of an event
api_response = api_instance.update_event_name(event_id, event_input_request=event_input_request)
print("The response of EventsApi->update_event_name:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EventsApi->update_event_name: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
event_id | int | The id of the event | |
event_input_request | EventInputRequest | The object that passes the updated name | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully changed name | * Cache-Control - * Content-Length - * Content-Type - * Date - * Etag - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
400 | Error parsing request | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]