SDKs & Examples
Get started quickly with our official SDKs and code examples.
Coming Soon: Official SDKs are currently in development. In the meantime, you can use the REST API directly.
Official SDKs (Coming Soon)
- Node.js -
@marcott/node - Python -
marcott-python - PHP -
marcott/php-sdk
Code Examples
Node.js (fetch)
const API_KEY = process.env.MARCOTT_API_KEY;
const BASE_URL = 'https://api.marcotstudios.com/v1';
// Get all listings
async function getListings() {
const response = await fetch(`${BASE_URL}/listings`, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
});
return response.json();
}
// Create a listing
async function createListing(data) {
const response = await fetch(`${BASE_URL}/listings`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
});
return response.json();
}Python (requests)
import requests
import os
API_KEY = os.environ.get('MARCOTT_API_KEY')
BASE_URL = 'https://api.marcotstudios.com/v1'
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json',
}
# Get all listings
def get_listings():
response = requests.get(f'{BASE_URL}/listings', headers=headers)
return response.json()
# Create a listing
def create_listing(data):
response = requests.post(
f'{BASE_URL}/listings',
headers=headers,
json=data
)
return response.json()cURL
# Get all listings
curl https://api.marcotstudios.com/v1/listings \
-H "Authorization: Bearer YOUR_API_KEY"
# Create a listing
curl https://api.marcotstudios.com/v1/listings \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"address": "123 Main St", "beds": 4, "baths": 3}'Community Integrations
Check out integrations built by our community:
- Zapier integration (coming soon)
- Make (Integromat) integration (coming soon)
- WordPress plugin (coming soon)
Need Help?
Contact our developer support at api@marcotstudios.com