All API requests require an API key to be included in the request headers:
const axios = require('axios');
const config = {
  method: 'GET',
  url: 'https://github-user-activity-api.onrender.com/api/v1/github/user/:username/activity',
  headers: { 
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  params: {
  "username": "octocat"
}
};
axios(config)
  .then(response => console.log(JSON.stringify(response.data)))
  .catch(error => console.log(error));Headers: Authorization: Bearer YOUR_API_KEY
Query Parameters: ?apiKey=YOUR_API_KEY
Example Request: GET /user/octocat/activity
{
  "status": "success",
  "data": {
    "username": "octocat",
    "activities": [
      {
        "type": "PushEvent",
        "repo": "octocat/Hello-World",
        "timestamp": "2025-02-21T10:00:00Z"
      },
      {
        "type": "PullRequestEvent",
        "repo": "octocat/Hello-World",
        "timestamp": "2025-02-21T12:00:00Z"
      }
    ]
  }
}