ROCKSTAR GAMES GALLERY — VIDEO API ENDPOINTS Base URL: https://apps.internetcongress.org/rockstargamesgallery/video-api.php ========================================================== 1. DEFAULT — FIRST PAGE ========================================================== GET https://apps.internetcongress.org/rockstargamesgallery/video-api.php Returns 20 videos, en-us, 720p, thumbnail size 300. ========================================================== 2. PAGINATION ========================================================== GET .../video-api.php?cursor=23 GET .../video-api.php?cursor=43 GET .../video-api.php?cursor=63 Pass the "next_cursor" value from the previous response. Repeat until "has_more" is false. ========================================================== 3. CUSTOM PAGE SIZE ========================================================== GET .../video-api.php?limit=10 GET .../video-api.php?limit=50 GET .../video-api.php?limit=100 Max limit is 100. ========================================================== 4. LANGUAGE VARIANTS ========================================================== GET .../video-api.php?lang=en-us GET .../video-api.php?lang=de GET .../video-api.php?lang=es GET .../video-api.php?lang=es-mx GET .../video-api.php?lang=fr GET .../video-api.php?lang=it GET .../video-api.php?lang=ja GET .../video-api.php?lang=ko GET .../video-api.php?lang=pl GET .../video-api.php?lang=pt-br GET .../video-api.php?lang=ru GET .../video-api.php?lang=zh-cn GET .../video-api.php?lang=zh-tw Any of the 13 supported language codes. ========================================================== 5. RESOLUTION VARIANTS ========================================================== GET .../video-api.php?res=720p GET .../video-api.php?res=1080p GET .../video-api.php?res=2160p Default is 720p. ========================================================== 6. THUMBNAIL SIZE ========================================================== GET .../video-api.php?thumb=150 GET .../video-api.php?thumb=300 GET .../video-api.php?thumb=600 GET .../video-api.php?thumb=1000 Any integer between 50 and 2000. ========================================================== 7. COMBINED EXAMPLES ========================================================== GET .../video-api.php?lang=de&res=1080p GET .../video-api.php?limit=30&thumb=600 GET .../video-api.php?lang=fr&res=1080p&thumb=600&limit=50&cursor=100 ========================================================== 8. ERROR CASES ========================================================== GET .../video-api.php?lang=xx -> 400 unsupported language GET .../video-api.php?res=4k -> 400 unsupported resolution GET .../video-api.php?thumb=9999 -> 400 thumb size out of range (50-2000) GET .../video-api.php?limit=999 -> 400 limit out of range (1-100) GET .../video-api.php?cursor=-1 -> 400 cursor must be >= 0 ========================================================== 9. RESPONSE SHAPE ========================================================== { "count": 20, "limit": 20, "lang": "en-us", "res": "720p", "thumb": 300, "has_more": true, "next_cursor": 23, "videos": [ { "id": 4, "key": "139227o8", "video_url": "https://videos-rockstargames-com.akamaized.net/v4/139227o8/flv/en-us-720p.mp4", "thumb_url": "https://videos-rockstargames-com.akamaized.net/v4/139227o8/art/global.jpg?im=Resize=300", "lang": "en-us", "res": "720p" } ] } ========================================================== 10. CURL TESTS ========================================================== curl "https://apps.internetcongress.org/rockstargamesgallery/video-api.php" curl "https://apps.internetcongress.org/rockstargamesgallery/video-api.php?cursor=23" curl -s "https://apps.internetcongress.org/rockstargamesgallery/video-api.php?limit=5" | jq curl -s ".../video-api.php?limit=100" | jq -r '.videos[].video_url' ========================================================== 11. PAGINATION LOOP (PSEUDOCODE) ========================================================== cursor = null loop: url = base + (cursor ? "?cursor=" + cursor : "") response = GET url render(response.videos) if response.has_more: cursor = response.next_cursor wait for user to scroll else: stop