Clash of Clans icon

Clash of Clans

Comprehensive Clash of Clans API integration with advanced features

Overview

This node integrates with the Clash of Clans API to retrieve various types of game data. Specifically, the "Get Clan Capital Raid Log" operation fetches the raid log for a clan's capital, providing detailed information about recent raids in the clan capital. This is useful for clan leaders or members who want to monitor activity and performance in their clan capital.

Practical examples:

  • A clan leader can use this node to automatically track recent capital raids and analyze member participation.
  • A community website could display up-to-date raid logs for clans to engage users.
  • Automated reports on clan capital activity can be generated for strategic planning.

Properties

Name Meaning
Clan Tag The unique identifier of the clan, must start with #. Specifies which clan to query.
Pagination Parameters to control paging through results:
- Limit: Maximum number of raid log entries to return (minimum 1).
- After: Return only items occurring after this marker (pagination cursor).
- Before: Return only items occurring before this marker (pagination cursor).

Output

The output JSON contains an object with the following structure:

{
  "operation": "getClanCapitalRaidLog",
  "url": "https://api.clashofclans.com/v1/clans/{clanTag}/capitalraidlog?limit=50",
  "data": { /* API response data with raid log details */ },
  "timestamp": "2024-06-XXTXX:XX:XX.XXXZ",
  "metadata": {
    "operationType": "clan",
    "apiVersion": "v1",
    "processedAt": "2024-06-XXTXX:XX:XX.XXXZ"
  }
}
  • The data field contains the raw API response with the clan capital raid log entries.
  • Each entry typically includes details such as raid participants, outcomes, timestamps, and other relevant raid statistics.
  • No binary data is output by this node.

Dependencies

  • Requires an API authentication token credential for the Clash of Clans API.
  • The node makes HTTP requests to the official Clash of Clans API endpoint (https://api.clashofclans.com/v1).
  • Proper API key setup and permissions are necessary in n8n credentials configuration.

Troubleshooting

  • Invalid Clan Tag: If the clan tag does not start with # or is incorrect, the API will return an error. Ensure the clan tag is valid and properly formatted.
  • API Rate Limits: Frequent requests may hit rate limits imposed by the Clash of Clans API. Implement pagination and respect limits.
  • Pagination Parameters: Using invalid or outdated pagination cursors (after, before) may result in empty responses or errors.
  • Authentication Errors: Missing or invalid API tokens will cause authorization failures. Verify that the API token credential is correctly configured.
  • Network Issues: Connectivity problems can cause request failures. Check network access and proxy settings if applicable.

Links and References

Discussion