Fomo Python SDK is the official SDK wrapper for the Fomo API service
Project description
Fomo Python SDK is the official SDK wrapper for the Fomo API service
API docs: http://docs.usefomo.com/reference
Requirements
PHP Version 2.7+
pyOpenSSL / OpenSSL with SNI support
Python module requests
Installation
Install the latest version with
$ pip install fomo
Manual User Installation
Download Fomo/fomo.py and include the file in your Python project.
Check out our examples in tests/test.py, quick usage examples:
Basic Usage
Initialize Fomo client via:
import Fomo
client = Fomo.FomoClient('<token>') # Auth token can be found Fomo application admin dashboard (App -> API Access)
To create a new event:
event = Fomo.FomoEventBasic()
event.event_type_id = '183' # Event type ID is found on Fomo dashboard (Templates -> Template ID)
event.title = 'Test event'
event.city = 'San Francisco'
event.url = 'https://www.usefomo.com'
created_event = client.create_event(event)
print(created_event)
To get an event:
event = client.get_event('<event ID>')
print(event)
To get all events:
events = client.get_events()
print(events)
To delete an event:
client.delete_event('<event ID>')
To update an event:
event = client.get_event('<event ID>')
event.first_name = 'John'
updated_event = client.update_event(event)
print(updated_event)
Support
If you have questions, email us at hello@usefomo.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fomo-1.0.0.tar.gz
(5.1 kB
view hashes)