api-integration-helperlisted
Install: claude install-skill mrheyday/agentic-solidity-foundry-skill
# API Integration Helper
## Kanitsal Cerceve (Evidential Frame Activation)
Kaynak dogrulama modu etkin.
Generate production-ready code for integrating with REST APIs.
## Overview
This skill helps developers quickly set up REST API integrations by generating boilerplate code that handles authentication, HTTP requests, response parsing, error handling, and retries. Supports JavaScript and Python.
## When to Use
Use this skill when you need to integrate with a third-party REST API and want to generate the initial setup code rather than writing it from scratch.
## Instructions
### Step 1: Gather API Requirements
Ask the user for API details: base URL, authentication method, and target language.
### Step 2: Set Up Authentication
Generate authentication code based on the method (API key or OAuth).
For API key authentication:
```javascript
// JavaScript
const headers = {
'Authorization': `Bearer ${process.env.API_KEY}`
};
```
```python
# Python
import os
headers = {
'Authorization': f'Bearer {os.environ["API_KEY"]}'
}
```
### Step 3: Create HTTP Request Function
Generate a function to make HTTP requests with error handling.
```javascript
async function apiRequest(endpoint, options = {}) {
const response = await fetch(`${BASE_URL}${endpoint}`, {
headers: headers,
...options
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
return await response.json();
}
```
### Step 4: Add Retry Logic
Implement exponential b