Skip to main content

Method signature

async def GET_getContent(
    self,
    region: str,
    locale: Optional[str] = ""
) -> Union[ContentDto, Dict]
Get content optionally filtered by locale. A locale is recommended to be used for faster response times.

Parameters

region
string
required
The region to execute against. Must be one of: ap, br, esports, eu, kr, latam, na.
locale
string
default:""
The locale to retrieve data for. If not specified, all locales will be returned. Valid locales are:
  • ar-AE (Arabic - UAE)
  • de-DE (German)
  • en-GB (English - UK)
  • en-US (English - US)
  • es-ES (Spanish - Spain)
  • es-MX (Spanish - Mexico)
  • fr-FR (French)
  • id-ID (Indonesian)
  • it-IT (Italian)
  • ja-JP (Japanese)
  • ko-KR (Korean)
  • pl-PL (Polish)
  • pt-BR (Portuguese - Brazil)
  • ru-RU (Russian)
  • th-TH (Thai)
  • tr-TR (Turkish)
  • vi-VN (Vietnamese)
  • zh-CN (Chinese - Simplified)
  • zh-TW (Chinese - Traditional)

Returns

ContentDto
object
Content data object containing game assets and metadata.
When raw_data=True is set on the client, this method returns a Dict instead of a ContentDto object.

Exceptions

  • InvalidRegion: If the provided region is invalid.
  • InvalidLocale: If the provided locale is invalid.
  • RiotAPIResponseError: If the API response indicates an error.

Example

import asyncio
from valaw import Client

async def main():
    client = Client(
        token="RGAPI-your-token-here",
        cluster="americas"
    )
    
    # Get all content for NA region
    content = await client.GET_getContent(region="na")
    print(f"Content version: {content.version}")
    print(f"Number of characters: {len(content.characters)}")
    
    await client.close()

asyncio.run(main())

Build docs developers (and LLMs) love