-
-
Notifications
You must be signed in to change notification settings - Fork 1
API
Drago edited this page Dec 6, 2024
·
2 revisions
The DevAssist bot provides a RESTful API for enterprise subscribers to integrate bot functionality into their own applications.
POST /api/auth
Content-Type: application/json
{
"api_key": "your_api_key_here"
}Response:
{
"token": "jwt_token_here",
"expires_in": 3600
}POST /api/code/review
Authorization: Bearer <token>
Content-Type: application/json
{
"code": "def example():\n return True",
"language": "python"
}Response:
{
"complexity": 1,
"suggestions": [...],
"security_issues": [...],
"performance_tips": [...]
}POST /api/project/create
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "my-project",
"template": "python-web"
}Response:
{
"structure": [...],
"setup_instructions": [...]
}- Free Tier: 100 requests/day
- Pro Tier: 1000 requests/day
- Enterprise Tier: Unlimited
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 429: Too Many Requests
- 500: Internal Server Error
// Connect to WebSocket
const ws = new WebSocket('wss://api.devassist.com/ws');
// Subscribe to events
ws.send(JSON.stringify({
type: 'subscribe',
events: ['code_review', 'project_update']
}));import requests
api_key = 'your_api_key'
headers = {'Authorization': f'Bearer {api_key}'}
response = requests.post(
'https://api.devassist.com/code/review',
headers=headers,
json={'code': 'print("Hello")'}
)
print(response.json())