### Simple Examples Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/00-START-HERE.md Examples of common API calls, including getting a list of mods, searching for a mod, and retrieving a user profile. ```APIDOC ## Simple Example ```bash # Get list of mods curl https://api.gamebanana.com/apiv12/Mod/Index # Search for a mod curl "https://api.gamebanana.com/apiv12/Mod/Search?query=sword" # Get user profile curl https://api.gamebanana.com/apiv12/Member/12345 ``` ``` -------------------------------- ### HTTP Request Example Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Illustrates the structure of an HTTP GET request to the API, including the Host and Accept headers. ```http GET /apiv12/Mod/Index HTTP/1.1 Host: api.gamebanana.com Accept: application/json ``` -------------------------------- ### Listing Resources with Pagination Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Examples for retrieving paginated lists of resources. The last example shows a loop to fetch all pages, requiring pagination logic in your client code. ```bash # Get page 1 (default) GET /apiv12/Mod/Index # Get specific page with custom page size GET /apiv12/Mod/Index?page=2&per_page=50 # Get all pages (implement pagination in your code) for page in 1..N: GET /apiv12/Mod/Index?page={page} if pagination.page >= pagination.total / pagination.per_page: break ``` -------------------------------- ### Get Mod Config Example Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-mod.md Use this endpoint to retrieve the configuration for a specific mod. The ID is required in the path. ```http GET https://api.gamebanana.com/apiv12/Mod/1/Config ``` -------------------------------- ### Making Your First Request Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Demonstrates how to make a basic GET request to the API and how to include parameters for pagination. ```APIDOC ## GET /apiv12/Mod/Index ### Description Retrieves a paginated list of mods. ### Method GET ### Endpoint /apiv12/Mod/Index ### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **per_page** (integer) - Optional - The number of items to return per page. ``` -------------------------------- ### Make a Python API Call Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/00-START-HERE.md Use the requests library in Python to make a GET request to the GameBanana API and print the list of mod items. Ensure the 'requests' library is installed. ```python import requests r = requests.get('https://api.gamebanana.com/apiv12/Mod/Index') print(r.json()['data']['items']) ``` -------------------------------- ### Get User Profile (cURL) Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Example cURL command to fetch a user's profile information by their member ID. ```bash curl "https://api.gamebanana.com/apiv12/Member/12345" ``` -------------------------------- ### API Response Example Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md A sample JSON response from the API, showing metadata, data items, and pagination information. ```json { "_meta": { "endpoint": "/apiv12/Mod/Index", "method": "GET", "status": "200", "content_type_hint": "application/json" }, "data": { "items": [ { "id": 1, "name": "First Mod" }, { "id": 2, "name": "Second Mod" } ], "pagination": { "page": 1, "per_page": 15, "total": 1000 } }, "errors": [] } ``` -------------------------------- ### Pagination Example Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints.md To retrieve a specific page of results from list endpoints, append the 'page' query parameter to the URL. ```http GET /api/endpoint?page=2 ``` -------------------------------- ### Listing Resources Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Examples for retrieving paginated lists of resources, including how to specify page numbers and page sizes, and a loop for fetching all pages. ```APIDOC ## GET /apiv12/Mod/Index ### Description Retrieves a paginated list of mods. ### Method GET ### Endpoint /apiv12/Mod/Index ### Query Parameters - **page** (integer) - Optional - The page number to retrieve. Defaults to 1. - **per_page** (integer) - Optional - The number of items to return per page. Defaults to 15. ``` -------------------------------- ### GET /apiv12/Game/Config Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Get global game configuration. This endpoint retrieves global settings and available filters for games. ```APIDOC ## GET /apiv12/Game/Config ### Description Get global game configuration. This endpoint provides access to the overall configuration settings for games, including available filters and default values. ### Method GET ### Endpoint /apiv12/Game/Config ### Response #### Success Response (200) - **data.filters** (array) - Available filters for games - **data.defaults** (object) - Default filter values - **errors** (array) - Error array #### Response Example { "data": { "filters": [ { "name": "genre", "options": ["RPG", "Action"] } ], "defaults": { "genre": "All" } }, "errors": [] } ``` -------------------------------- ### Discovering Filter Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md This example shows how to retrieve the available filter options for a resource type. The response details filter keys, valid values, and defaults. ```bash # Get filter options for a resource type GET /apiv12/Mod/ListFilterConfig # Response includes: # - Available filter keys (sort, game, category, etc.) # - Valid values for each filter # - Default values ``` -------------------------------- ### API Request with Parameters Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md This example shows how to include parameters like page number and items per page in your API request to the Mod Index endpoint. ```bash curl "https://api.gamebanana.com/apiv12/Mod/Index?page=1&per_page=30" ``` -------------------------------- ### Get Global Game Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Retrieve global game configuration, including available filters and default filter values. ```http GET https://api.gamebanana.com/apiv12/Game/Config ``` -------------------------------- ### Accessing Individual Resources Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Examples for retrieving specific details or associated data for a single resource, identified by its ID. This includes profile pages, configurations, files, posts, and updates. ```bash # Get mod with ID 682129 GET /apiv12/Mod/682129/ProfilePage # Get configuration for a resource GET /apiv12/Mod/682129/Config # Get associated files GET /apiv12/Mod/682129/Files # Get discussion posts GET /apiv12/Mod/682129/Posts # Get version history/updates GET /apiv12/Mod/682129/Updates ``` -------------------------------- ### Get File Information (v12) Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-file.md Use this GET request to retrieve metadata for a specific file using its integer ID. ```http GET /apiv12/File/54321 ``` -------------------------------- ### Accessing Individual Resources Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Provides examples for retrieving detailed information about a specific resource, such as its profile page, configuration, files, posts, or update history. ```APIDOC ## GET /apiv12/Mod/{id}/ProfilePage ### Description Retrieves the profile page details for a specific mod. ### Method GET ### Endpoint /apiv12/Mod/{id}/ProfilePage ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the mod. ``` ```APIDOC ## GET /apiv12/Mod/{id}/Config ### Description Retrieves the configuration for a specific mod. ### Method GET ### Endpoint /apiv12/Mod/{id}/Config ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the mod. ``` ```APIDOC ## GET /apiv12/Mod/{id}/Files ### Description Retrieves the associated files for a specific mod. ### Method GET ### Endpoint /apiv12/Mod/{id}/Files ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the mod. ``` ```APIDOC ## GET /apiv12/Mod/{id}/Posts ### Description Retrieves the discussion posts for a specific mod. ### Method GET ### Endpoint /apiv12/Mod/{id}/Posts ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the mod. ``` ```APIDOC ## GET /apiv12/Mod/{id}/Updates ### Description Retrieves the version history or updates for a specific mod. ### Method GET ### Endpoint /apiv12/Mod/{id}/Updates ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the mod. ``` -------------------------------- ### Get Available Filter Options (JavaScript) Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Fetch the configuration for available filters for a given resource type. This is useful for understanding what filtering parameters can be used. Requires a fetch-capable environment. ```javascript async function getAvailableFilters(resourceType) { const response = await fetch( `https://api.gamebanana.com/apiv12/${resourceType}/ListFilterConfig` ); const data = await response.json(); return data.data.filters; } // Usage const filters = await getAvailableFilters('Mod'); console.log('Available sort options:', filters.find(f => f.key === 'sort').values); ``` -------------------------------- ### Get List of Mods Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/00-START-HERE.md Use this curl command to retrieve a list of all available game modifications from the API. ```bash # Get list of mods curl https://api.gamebanana.com/apiv12/Mod/Index ``` -------------------------------- ### Get Configuration Endpoint Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Retrieve the configuration for a resource. This can be done for a general resource type or a specific resource by its ID. ```HTTP GET /apiv12/{Resource}/Config ``` ```HTTP GET /apiv12/{Resource}/{id}/Config ``` -------------------------------- ### Get File Download Link Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-file.md Retrieves a direct URL or a page from which a specific file can be downloaded. ```APIDOC ## GET /apiv12/File/{fileId}/DownloadPage ### Description Retrieves a link to download a specific file. ### Method GET ### Endpoint /apiv12/File/{fileId}/DownloadPage ### Parameters #### Path Parameters - **fileId** (integer) - Required - The unique identifier of the file to download. ``` -------------------------------- ### Member Data Structure Example Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-member.md This JSON object represents the typical data structure returned for a member profile. ```json { "id": 12345, "username": "username", "display_name": "Display Name", "avatar_url": "https://gamebanana.com/avatars/12345.png", "created_at": "2020-01-01T00:00:00Z", "bio": "User biography", "website": "https://example.com", "mod_count": 50, "follower_count": 100, "following_count": 30, "total_downloads": 50000, "status": "active" } ``` -------------------------------- ### List Filter Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-mod.md Get list filter configuration for mods. Returns available filter options and defaults. ```APIDOC ## GET /apiv12/Mod/ListFilterConfig ### Description Get list filter configuration for mods. Returns available filter options and defaults. ### Method GET ### Endpoint /apiv12/Mod/ListFilterConfig ### Response #### Success Response (200) - **data.filters** (array) - Array of filter objects with available values - **data.filters[].key** (string) - Filter key (e.g., "sort", "game") - **data.filters[].values** (array) - Array of valid values for this filter - **data.defaults** (object) - Default filter values ### Note This endpoint may return HTML. Inspect the `Content-Type` response header before parsing JSON. ``` -------------------------------- ### Get Game List Filter Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Obtain the filter configuration specifically for listing games. This includes detailed filter objects and default values. ```http GET https://api.gamebanana.com/apiv12/Game/ListFilterConfig ``` -------------------------------- ### Make a JavaScript API Call Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/00-START-HERE.md Use the fetch API in JavaScript to make a GET request to the GameBanana API and log the list of mod items. Ensure your environment supports fetch. ```javascript fetch('https://api.gamebanana.com/apiv12/Mod/Index') .then(r => r.json()) .then(data => console.log(data.data.items)) ``` -------------------------------- ### Get File Endpoint Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-file.md Retrieves the configuration for the file endpoint, including available filters and default values. ```APIDOC ## GET /apiv12/File/Config ### Description Get file endpoint configuration. ### Method GET ### Endpoint /apiv12/File/Config ### Response #### Success Response (200) - **data.filters** (array) - Available file filters - **data.defaults** (object) - Default values - **errors** (array) - Error array ``` -------------------------------- ### Make a cURL API Call Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/00-START-HERE.md Use this cURL command to fetch a list of mods from the GameBanana API. This is a basic example for testing endpoint accessibility. ```bash curl https://api.gamebanana.com/apiv12/Mod/Index ``` -------------------------------- ### GET /apiv12/Game/Index Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md List primary games. Returns an array of game objects with their IDs and names, along with pagination information. ```APIDOC ## GET /apiv12/Game/Index ### Description List primary games. This endpoint retrieves a list of main game platforms available on the system. ### Method GET ### Endpoint /apiv12/Game/Index ### Response #### Success Response (200) - **data.items** (array) - Array of game objects with id and name - **data.pagination** (object) - Pagination information - **errors** (array) - Error array #### Response Example { "data": { "items": [ { "id": "123", "name": "Example Game" } ], "pagination": { "total": 100, "offset": 0, "limit": 20 } }, "errors": [] } ``` -------------------------------- ### Example Mod Index Response Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-mod.md This JSON structure represents a successful response from the Mod Index endpoint, showing metadata, a list of mods, and pagination details. ```json { "_meta": { "endpoint": "/apiv12/Mod/Index", "method": "GET", "status": "200", "content_type_hint": "application/json" }, "data": { "items": [ { "id": 1, "name": "mod-name-1" }, { "id": 2, "name": "mod-name-2" } ], "pagination": { "page": 1, "per_page": 15, "total": 1000 } }, "errors": [] } ``` -------------------------------- ### Get All Mods Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Retrieves a list of all available mods. This endpoint can be used with pagination parameters to fetch mods across multiple pages. ```APIDOC ## GET /apiv12/Mod/Index ### Description Retrieves a list of all available mods. This endpoint can be used with pagination parameters to fetch mods across multiple pages. ### Method GET ### Endpoint /apiv12/Mod/Index ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **per_page** (integer) - Optional - The number of items to return per page. ### Request Example ```bash curl "https://api.gamebanana.com/apiv12/Mod/Index?page=1&per_page=50" ``` ### Response #### Success Response (200) - **_meta** (object) - Metadata about the request. - **data** (object) - Contains the resource data, typically an array of mod items. - **errors** (array) - An array of errors, if any occurred. #### Response Example ```json { "_meta": { "endpoint": "/apiv12/Mod/Index", "method": "GET", "status": "200", "content_type_hint": "application/json" }, "data": { "items": [ /* mod data */ ] }, "errors": [] } ``` ``` -------------------------------- ### File Data Structure Example Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-file.md This JSON object represents the structure of file information returned by the API. It includes details such as file ID, name, size, MIME type, download count, upload date, checksums, download URL, owner ID, and virus scan status. ```json { "id": 54321, "filename": "example.zip", "size": 5242880, "mime_type": "application/zip", "download_count": 1000, "upload_date": "2026-01-15T10:30:00Z", "checksum_sha256": "abcdef1234567890", "checksum_md5": "1234567890abcdef", "download_url": "https://api.gamebanana.com/dl/54321", "owner_id": 12345, "virus_scanned": true, "scan_status": "clean" } ``` -------------------------------- ### Get Mod Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-mod.md Retrieves the configuration settings for a specific mod using its ID. This includes available filters and their default values. ```APIDOC ## GET /apiv12/Mod/{id1}/Config ### Description Get resource configuration for a specific mod. ### Method GET ### Endpoint /apiv12/Mod/{id1}/Config ### Parameters #### Path Parameters - **id1** (integer) - Required - Mod ID ### Response #### Success Response (200) - **data.filters** (array) - Available filters for this resource - **data.defaults** (object) - Default filter values - **errors** (array) - Error array #### Error Response (404) - Resource not found ### Request Example ``` GET https://api.gamebanana.com/apiv12/Mod/1/Config ``` ``` -------------------------------- ### Get all games Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Retrieves a paginated list of all available games. Users should repeatedly call this endpoint with incrementing page numbers until all data is fetched. ```APIDOC ## GET /apiv12/Game/Index ### Description Retrieves a paginated list of all games. ### Method GET ### Endpoint /apiv12/Game/Index ### Query Parameters - **page** (integer) - Required - The page number to retrieve. - **per_page** (integer) - Optional - The number of items to return per page. Defaults to 50. ``` -------------------------------- ### GET Request for Trash Reasons Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-util.md Use this endpoint to list valid reasons for trashing content. A successful response will return a 200 status code. ```http GET https://api.gamebanana.com/apiv12/Util/Config/TrashReasons ``` -------------------------------- ### Get Mod Download Page Information Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-mod.md Fetch download links and metadata for a specific mod. The Mod ID must be provided in the URL path. ```http GET https://api.gamebanana.com/apiv12/Mod/1/DownloadPage ``` -------------------------------- ### Get All Data from List Endpoint with cURL Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md A bash script using cURL and jq to fetch all pages of data from a list endpoint, demonstrating how to parse JSON responses and loop through paginated results. ```bash #!/bin/bash PAGE=1 BASE_URL="https://api.gamebanana.com/apiv12/Mod/Index" while true; do RESPONSE=$(curl -s "${BASE_URL}?page=${PAGE}") # Extract items and check if more pages exist ITEM_COUNT=$(echo "$RESPONSE" | jq '.data.items | length') CURRENT_PAGE=$(echo "$RESPONSE" | jq '.data.pagination.page') TOTAL_PAGES=$(echo "$RESPONSE" | jq '.data.pagination.total / .data.pagination.per_page | ceil') echo "Page $CURRENT_PAGE of $TOTAL_PAGES ($ITEM_COUNT items)" if [ "$CURRENT_PAGE" -ge "$TOTAL_PAGES" ]; then break fi PAGE=$((PAGE + 1)) done ``` -------------------------------- ### Retrieve All Items with Pagination (Python) Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Use this function to fetch all items from a paginated endpoint. It handles iterating through pages until all data is retrieved. Ensure the 'requests' library is installed. ```python import requests def get_all_items(endpoint, items_per_page=50): """Retrieve all items from a paginated endpoint.""" items = [] page = 1 while True: response = requests.get( f"https://api.gamebanana.com{endpoint}", params={"page": page, "per_page": items_per_page} ) response.raise_for_status() data = response.json() items.extend(data['data']['items']) # Check if we've reached the last page pagination = data['data']['pagination'] if page * items_per_page >= pagination['total']: break page += 1 return items ``` -------------------------------- ### Get Mod Posts Example Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-mod.md Use this endpoint to list discussion posts for a specific mod. The mod ID is required in the path. ```http GET https://api.gamebanana.com/apiv12/Mod/1/Posts ``` -------------------------------- ### Searching Resources Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Demonstrates how to search for resources, such as mods, using a query parameter and how to combine search with filters like game ID. ```bash # Search for mods by query GET /apiv12/Mod/Search?query=sword # Combine search with filters GET /apiv12/Mod/Search?query=weapon&game=10 ``` -------------------------------- ### GET Request for Homepage Community Spotlight Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-util.md Fetch featured community content for the homepage. Note that this endpoint may return HTML; always check the Content-Type header. ```http GET https://api.gamebanana.com/apiv12/Util/Homepage/CommunitySpotlight ``` -------------------------------- ### Get File Details Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-file.md Retrieves detailed information for a specific file using its ID. Includes filename, size, MIME type, download count, upload date, checksum, download URL, and owner ID. ```APIDOC ## GET /apiv12/File/{fileId} ### Description Get details for a specific file. ### Method GET ### Endpoint /apiv12/File/{fileId} ### Parameters #### Path Parameters - **fileId** (integer) - Required - File ID ### Response #### Success Response (200) - **data.id** (integer) - File ID - **data.filename** (string) - Original filename - **data.size** (integer) - File size in bytes - **data.mime_type** (string) - MIME content type - **data.download_count** (integer) - Total downloads - **data.upload_date** (string) - Upload timestamp (ISO 8601) - **data.checksum_sha256** (string) - SHA-256 hash - **data.download_url** (string) - Direct download URL - **data.owner_id** (integer) - File owner ID - **errors** (array) - Error array ``` -------------------------------- ### Get Resource Details Endpoints Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Fetch detailed information about a specific resource, including its profile page and download page. These endpoints are crucial for accessing in-depth data about individual items. ```HTTP GET /apiv12/{Resource}/{id}/ProfilePage ``` ```HTTP GET /apiv12/{Resource}/{id}/DownloadPage ``` -------------------------------- ### GET /apiv12/Game/ListFilterConfig Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Get list filter configuration for games. This endpoint retrieves specific filter configurations used for listing games. ```APIDOC ## GET /apiv12/Game/ListFilterConfig ### Description Get list filter configuration for games. This endpoint provides detailed filter options and their default values applicable when listing games. ### Method GET ### Endpoint /apiv12/Game/ListFilterConfig ### Response #### Success Response (200) - **data.filters** (array) - Array of filter objects - **data.defaults** (object) - Default values - **errors** (array) - Error array #### Response Example { "data": { "filters": [ { "id": "genre", "label": "Genre", "options": ["RPG", "Action", "Strategy"] } ], "defaults": { "genre": "All" } }, "errors": [] } ``` -------------------------------- ### Implement Dual-Version API Support Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/api-versions.md Shows a method for dynamically selecting the API version based on an environment variable, facilitating graceful transitions between versions. ```javascript const API_VERSION = process.env.API_VERSION || 'v12'; async function getMods() { const url = `https://api.gamebanana.com/api${API_VERSION}/Mod/Index`; const response = await fetch(url); return response.json(); } ``` -------------------------------- ### Get by ID Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints.md Retrieves the full details of a single resource using its unique identifier. ```APIDOC ## Get by ID ### Description Retrieves the full details of a single resource using its unique identifier. ### Method GET ### Endpoint `/apiv12/{Resource}/{id}` ``` -------------------------------- ### Get User Profile Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Retrieves the profile information for a specific user, identified by their user ID. ```APIDOC ## GET /apiv12/Member/{userId} ### Description Retrieves the profile information for a specific user, identified by their user ID. ### Method GET ### Endpoint /apiv12/Member/{userId} ### Parameters #### Path Parameters - **userId** (integer) - Required - The unique identifier of the user. ### Request Example ```bash curl "https://api.gamebanana.com/apiv12/Member/12345" ``` ### Response #### Success Response (200) - **_meta** (object) - Metadata about the request. - **data** (object) - Contains the user's profile information. - **errors** (array) - An array of errors, if any occurred. #### Response Example ```json { "_meta": { "endpoint": "/apiv12/Member/12345", "method": "GET", "status": "200", "content_type_hint": "application/json" }, "data": { "member": { /* user profile details */ } }, "errors": [] } ``` ``` -------------------------------- ### Access New Resources in v12 Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/api-versions.md Demonstrates how to access resources like Articles and Forums, which are exclusively available in API v12. ```javascript // Available only in v12 async function getArticles() { const response = await fetch('https://api.gamebanana.com/apiv12/Article/Index'); return response.json(); } async function getForums() { const response = await fetch('https://api.gamebanana.com/apiv12/Forum/Index'); return response.json(); } ``` -------------------------------- ### Get game statistics Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Retrieves aggregated game data and statistics for a specific game ID. ```APIDOC ## GET /apiv12/Game/{gameId}/ProfilePage ### Description Retrieves aggregated game data and statistics for a specific game. ### Method GET ### Endpoint /apiv12/Game/{gameId}/ProfilePage ### Parameters #### Path Parameters - **gameId** (integer) - Required - The ID of the game. ``` -------------------------------- ### Get Game Details Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Retrieves detailed information for a specific game using its unique ID. ```APIDOC ## GET /apiv12/Game/{gameId} ### Description Get details for a specific game. ### Method GET ### Endpoint /apiv12/Game/{gameId} ### Parameters #### Path Parameters - **gameId** (integer) - Required - Game ID ### Response #### Success Response (200) - **data.id** (integer) - Game ID - **data.name** (string) - Game title - **data.description** (string) - Game description - **data.icon_url** (string) - Game icon URL - **data.banner_url** (string) - Game banner URL - **data.mod_count** (integer) - Number of mods - **data.total_downloads** (integer) - Total downloads - **errors** (array) - Error array ### Status Code - 200: Successful response - 404: Game not found ### Example Request ``` GET https://api.gamebanana.com/apiv12/Game/10 ``` ``` -------------------------------- ### Search for Content (cURL) Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Demonstrates how to search for specific content, such as mods, using a query parameter. ```bash curl "https://api.gamebanana.com/apiv12/Mod/Search?query=sword" ``` -------------------------------- ### Get Member Activity Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-member.md Retrieves the recent activity feed for a specific member identified by their member ID. ```APIDOC ## GET /apiv12/Member/{memberId}/Activity ### Description Get recent activity for a member. ### Method GET ### Endpoint /apiv12/Member/{memberId}/Activity ### Parameters #### Path Parameters - **memberId** (integer) - Required - Member ID ### Response #### Success Response (200) - **data.items** (array) - Array of activity objects - **data.pagination** (object) - Pagination information - **errors** (array) - Error array #### Response Example { "data": { "items": [ { "type": "upload", "timestamp": "2023-10-27T10:00:00Z", "details": { "name": "New Mod Uploaded" } } ], "pagination": { "total": 100, "page": 1, "per_page": 20 } }, "errors": [] } ### Status Codes - 200: Successful response - 404: Member not found ``` -------------------------------- ### List Game Content (cURL) Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Shows how to list content, specifically mods, associated with a particular game ID. ```bash curl "https://api.gamebanana.com/apiv12/Game/10/Mods" ``` -------------------------------- ### Get Member Profile Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-member.md Retrieves detailed profile information for a specific member using their member ID. ```APIDOC ## GET /apiv12/Member/{memberId} ### Description Get member profile information. ### Method GET ### Endpoint /apiv12/Member/{memberId} ### Parameters #### Path Parameters - **memberId** (integer) - Required - Member ID ### Response #### Success Response (200) - **data.id** (integer) - Member ID - **data.username** (string) - Login username - **data.display_name** (string) - Display name - **data.avatar_url** (string) - Avatar image URL - **data.created_at** (string) - Account creation date (ISO 8601) - **data.bio** (string) - User biography - **data.website** (string) - Personal website URL - **data.follower_count** (integer) - Number of followers - **data.mod_count** (integer) - Number of submissions - **data.status** (string) - Account status (active, inactive, banned) - **errors** (array) - Error array #### Error Response (404) - Member not found ``` -------------------------------- ### Get Download Page for File Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-file.md Retrieves the download page information for a specific file using its ID. ```APIDOC ## File - DownloadPage ### Description Get download page for a specific file. ### Method GET ### Endpoint `/apiv12/File/{fileId}/DownloadPage` ### Parameters #### Path Parameters - **fileId** (integer) - Required - File ID ### Response #### Success Response (200) - **data.file** (object) - File information - **data.download_link** (string) - Download URL - **data.metadata** (object) - File metadata - **data.checksums** (object) - Integrity checksums - **errors** (array) - Error array #### Response Example { "data": { "file": { "id": 54321, "filename": "example.zip", "size": 5242880, "mime_type": "application/zip", "download_count": 1000, "upload_date": "2026-01-15T10:30:00Z", "checksum_sha256": "abcdef1234567890", "checksum_md5": "1234567890abcdef", "download_url": "https://api.gamebanana.com/dl/54321", "owner_id": 12345, "virus_scanned": true, "scan_status": "clean" }, "download_link": "https://api.gamebanana.com/dl/54321", "metadata": {}, "checksums": { "sha256": "abcdef1234567890", "md5": "1234567890abcdef" } }, "errors": [] } ### Status Codes - 200: Successful response - 404: File not found ``` -------------------------------- ### Documentation Directory Structure Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/INDEX.md Illustrates the organization of the GameBanana API documentation files. This structure helps users navigate and find specific API information. ```text /output ├── README.md ..................... Start here - Complete overview ├── Overview.md ................... API fundamentals ├── Usage-guide.md ................ Practical examples ├── Endpoints.md .................. Complete endpoint index ├── Types.md ...................... Data type definitions ├── API-versions.md ............... Version history and migration ├── Advanced-patterns.md ........... Expert techniques ├── INDEX.md (this file) ........... Documentation index └── endpoints/ ├── v12-mod.md ................ Mod resource detailed reference ├── v12-game.md ............... Game resource detailed reference ├── v12-member.md ............. Member resource detailed reference ├── v12-file.md ............... File resource detailed reference └── v12-util.md ............... Utility endpoints reference ``` -------------------------------- ### File Download Process Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Steps to download a file using the API. ```APIDOC ## File Downloads 1. **Get file metadata**: `GET /apiv12/File/{fileId}` 2. **Extract download URL** from the response. 3. **Download file** from the extracted URL. 4. **Verify SHA-256 checksum**. 5. **Check virus scan status**. ``` -------------------------------- ### Download File with Resume Support Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-file.md Downloads a file from a given file ID, supporting resumable downloads. It checks for existing partial downloads and resumes from where it left off. Includes progress reporting and final checksum verification. ```python import requests import os def download_file(file_id, output_path, chunk_size=8192): """Download file with resume support.""" # Get file info response = requests.get(f'https://api.gamebanana.com/apiv12/File/{file_id}') response.raise_for_status() file_data = response.json()['data'] url = file_data['download_url'] total_size = file_data['size'] # Check if file exists and resume downloaded = 0 mode = 'ab' # append binary if not os.path.exists(output_path): mode = 'wb' # write binary else: downloaded = os.path.getsize(output_path) headers = {} if downloaded > 0: headers['Range'] = f'bytes={downloaded}-' # Download response = requests.get(url, headers=headers, stream=True) response.raise_for_status() with open(output_path, mode) as f: for chunk in response.iter_content(chunk_size=chunk_size): if chunk: f.write(chunk) downloaded += len(chunk) progress = (downloaded / total_size) * 100 print(f'Progress: {progress:.1f}%') # Verify checksum if verify_checksum(output_path, file_data['checksum_sha256']): return output_path else: raise ValueError('Checksum mismatch') ``` -------------------------------- ### Fetch All Mods with Pagination in JavaScript Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Demonstrates how to fetch all available mods by paginating through the API results. Ensure you handle API rate limits if making many requests. ```javascript async function getAllMods() { const mods = []; let page = 1; while (true) { const response = await fetch( `https://api.gamebanana.com/apiv12/Mod/Index?page=${page}` ); const json = await response.json(); mods.push(...json.data.items); if (json.data.pagination.page >= Math.ceil(json.data.pagination.total / json.data.pagination.per_page)) { break; } page++; } return mods; } ``` -------------------------------- ### GET /apiv12/Game/Search Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Search games by query. This endpoint allows searching for games based on a provided query string. ```APIDOC ## GET /apiv12/Game/Search ### Description Search games by query. This endpoint finds games that match the provided search query. ### Method GET ### Endpoint /apiv12/Game/Search ### Parameters #### Query Parameters - **q** (string) - Required - The search query string. ### Response #### Success Response (200) - **data.items** (array) - Array of matching game objects - **data.pagination** (object) - Pagination information - **errors** (array) - Error array #### Response Example { "data": { "items": [ { "id": "456", "name": "Another Game" } ], "pagination": { "total": 50, "offset": 0, "limit": 10 } }, "errors": [] } ``` -------------------------------- ### Base URL Structure Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints.md All endpoints follow this pattern. Replace X with the API version, {Resource} with the resource type, and {Action} with the action name or resource ID. ```text https://api.gamebanana.com/apivX/{Resource}/{Action} ``` -------------------------------- ### Get Member Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-member.md Retrieves the configuration details for the member endpoints, including available filters and default values. ```APIDOC ## GET /apiv12/Member/Config ### Description Get member endpoint configuration. ### Method GET ### Endpoint /apiv12/Member/Config ### Response #### Success Response (200) - **data.filters** (array) - Available member filters - **data.defaults** (object) - Default values - **errors** (array) - Error array ``` -------------------------------- ### Handle Pagination (cURL) Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Illustrates fetching multiple pages of results by iterating through page numbers and specifying items per page. ```bash # Fetch multiple pages for page in 1 2 3; do curl "https://api.gamebanana.com/apiv12/Mod/Index?page=$page&per_page=50" done ``` -------------------------------- ### Get User Profile Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/00-START-HERE.md Retrieve a user's profile information by specifying their member ID in the API request. ```bash # Get user profile curl https://api.gamebanana.com/apiv12/Member/12345 ``` -------------------------------- ### Resource Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Retrieves global or resource-specific configuration. ```APIDOC ## GET /apiv12/{Resource}/Config ### Description Retrieve global configuration for a resource type. ### Method GET ### Endpoint /apiv12/{Resource}/Config ``` ```APIDOC ## GET /apiv12/{Resource}/{id}/Config ### Description Retrieve configuration specific to a particular resource instance. ### Method GET ### Endpoint /apiv12/{Resource}/{id}/Config ``` -------------------------------- ### Searching Resources Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Shows how to search for resources using a query parameter and how to combine search with filters. ```APIDOC ## GET /apiv12/Mod/Search ### Description Searches for mods based on a query and optional filters. ### Method GET ### Endpoint /apiv12/Mod/Search ### Query Parameters - **query** (string) - Required - The search term. - **game** (integer) - Optional - Filter by game ID. ``` -------------------------------- ### Get mods for a game Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Retrieves a paginated list of mods associated with a specific game ID. Supports sorting and pagination. ```APIDOC ## GET /apiv12/Game/{gameId}/Mods ### Description Retrieves a paginated list of mods for a specific game. ### Method GET ### Endpoint /apiv12/Game/{gameId}/Mods ### Parameters #### Path Parameters - **gameId** (integer) - Required - The ID of the game. #### Query Parameters - **sort** (string) - Optional - The field to sort the mods by (e.g., 'downloads'). - **page** (integer) - Optional - The page number to retrieve. Defaults to 1. ``` -------------------------------- ### Index Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints.md Lists all resources of a given type. This endpoint returns a paginated list of resources. ```APIDOC ## Index ### Description Lists all resources of a given type. This endpoint returns a paginated list of resources. ### Method GET ### Endpoint `/apiv12/{Resource}/Index` ``` -------------------------------- ### Get all games (paginated) Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-game.md Retrieve a paginated list of games. Repeat requests with incrementing page numbers until all data is fetched. ```http GET /apiv12/Game/Index?page=1&per_page=50 (repeat with page=2, 3, ... until pagination.total is reached) ``` -------------------------------- ### List All Resources Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md Lists primary resources for a given category. Supports pagination. ```APIDOC ## GET /apiv12/{Resource}/Index ### Description List primary resources for a given category. ### Method GET ### Endpoint /apiv12/{Resource}/Index ### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **per_page** (integer) - Optional - The number of items per page. ``` -------------------------------- ### Directory Structure for GameBanana API Docs Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/README.md This snippet shows the file and directory structure for the GameBanana API documentation project. It helps in understanding where different types of documentation are located. ```tree / ├── README.md (this file) ├── overview.md - API fundamentals ├── usage-guide.md - Practical examples and patterns ├── api-versions.md - Version information and migration ├── endpoints.md - Complete endpoint reference ├── types.md - Data type definitions └── endpoints/ ├── v12-mod.md - Mod resource documentation ├── v12-game.md - Game resource documentation ├── v12-member.md - Member resource documentation ├── v12-file.md - File resource documentation └── v12-util.md - Utility endpoints documentation ``` -------------------------------- ### Get Popular Members Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-member.md Retrieve a paginated list of members, sorted by follower count. Useful for discovering influential users. ```http GET /apiv12/Member/Index?sort=followers&page=1&per_page=50 ``` -------------------------------- ### Filter Configuration Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/usage-guide.md Explains how to discover available filters for a resource type, including filter keys, valid values, and default values. ```APIDOC ## GET /apiv12/Mod/ListFilterConfig ### Description Retrieves the filter configuration options for mods. ### Method GET ### Endpoint /apiv12/Mod/ListFilterConfig ### Response #### Success Response (200) - **Available filter keys** (array of strings) - e.g., sort, game, category. - **Valid values for each filter** (object) - Maps filter keys to their possible values. - **Default values** (object) - Specifies the default filter settings. ``` -------------------------------- ### GET /apiv12/Member/{memberId}/Following Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-member.md Retrieves a list of members that the specified user is following. Requires the member's ID. ```APIDOC ## GET /apiv12/Member/{memberId}/Following ### Description List members this user is following. ### Method GET ### Endpoint /apiv12/Member/{memberId}/Following ### Parameters #### Path Parameters - **memberId** (integer) - yes - Member ID ### Response #### Success Response (200) - **data.items** (array) - Array of followed member objects - **data.pagination** (object) - Pagination information - **errors** (array) - Error array #### Response Example { "data": { "items": [ { "memberId": 789, "username": "FollowingUser", "avatarUrl": "http://example.com/avatar.png" } ], "pagination": { "currentPage": 1, "totalPages": 2, "pageSize": 20 } }, "errors": [] } ### Status Code - 200: Successful response - 404: Member not found ``` -------------------------------- ### API Basics Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/00-START-HERE.md Information on the base URL, HTTP method, data format, and authentication for the GameBanana API. ```APIDOC ## API Basics Base URL: https://api.gamebanana.com/apiv12/ Method: GET (read-only) Format: JSON Auth: Not required for public data ``` -------------------------------- ### GET /apiv12/Member/{memberId}/Followers Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-member.md Retrieves a list of members who are following the specified user. Requires the member's ID. ```APIDOC ## GET /apiv12/Member/{memberId}/Followers ### Description List members following this user. ### Method GET ### Endpoint /apiv12/Member/{memberId}/Followers ### Parameters #### Path Parameters - **memberId** (integer) - yes - Member ID ### Response #### Success Response (200) - **data.items** (array) - Array of follower member objects - **data.pagination** (object) - Pagination information - **errors** (array) - Error array #### Response Example { "data": { "items": [ { "memberId": 456, "username": "FollowerUser", "avatarUrl": "http://example.com/avatar.png" } ], "pagination": { "currentPage": 1, "totalPages": 3, "pageSize": 20 } }, "errors": [] } ### Status Code - 200: Successful response - 404: Member not found ``` -------------------------------- ### Get Member Mods List Source: https://github.com/immalloy/gamebananaapi-docs/blob/main/_autodocs/endpoints/v12-member.md Retrieves a list of mods submitted by a specific member. Requires the member's ID. ```http GET https://api.gamebanana.com/apiv12/Member/12345/Mods ```