Git Product home page Git Product logo

rawg's Introduction

rawg

Python PyPI Build Status

API wrapper for RAWG.io

This Python package is automatically generated by the OpenAPI Generator project.

Installation & Usage

pip install

Install via PyPI (recommended):

pip install rawg

Setuptools

Install via Setuptools.

python setup.py install --user

Getting Started

Example

import asyncio

import rawg


async def requests():
    async with rawg.ApiClient() as api_client:
        # Create an instance of the API class
        api = rawg.GamesApi(api_client)

        # Making requests
        coros = [api.games_read(id=name) for name in ['grand-theft-auto-v', 'minecraft']]

        # Waiting for requests
        for coro in asyncio.as_completed(coros):
            game: rawg.GameSingle = await coro
            print('        Name |', game.name)
            print('    Released |', game.released)
            print('      Rating |', game.rating)
            print('Achievements |', game.achievements_count)
            print('     Website |', game.website)
            print('  Metacritic |', game.metacritic)
            print('โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”')


if __name__ == '__main__':
    asyncio.get_event_loop().run_until_complete(requests())

Output

        Name | Grand Theft Auto V
    Released | 2013-09-17
      Rating | 4.48
Achievements | 369
     Website | http://www.rockstargames.com/V/
  Metacritic | 97
โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”
        Name | Minecraft
    Released | 2009-05-10
      Rating | 4.38
Achievements | 288
     Website | https://minecraft.net
  Metacritic | 83
โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”

Documentation for API Endpoints

All URIs are relative to https://api.rawg.io/api

Class Method HTTP request Description
CreatorRolesApi creator_roles_list GET /creator-roles Get a list of creator positions (jobs).
CreatorsApi creators_list GET /creators Get a list of game creators.
CreatorsApi creators_read GET /creators/{id} Get details of the creator.
DevelopersApi developers_list GET /developers Get a list of game developers.
DevelopersApi developers_read GET /developers/{id} Get details of the developer.
GamesApi games_achievements_read GET /games/{id}/achievements Get a list of game achievements.
GamesApi games_additions_list GET /games/{game_pk}/additions Get a list of DLC's for the game, GOTY and other editions, companion apps, etc.
GamesApi games_development_team_list GET /games/{game_pk}/development-team Get a list of individual creators that were part of the development team.
GamesApi games_game_series_list GET /games/{game_pk}/game-series Get a list of games that are part of the same series.
GamesApi games_list GET /games Get a list of games.
GamesApi games_movies_read GET /games/{id}/movies Get a list of game trailers.
GamesApi games_parent_games_list GET /games/{game_pk}/parent-games Get a list of parent games for DLC's and editions.
GamesApi games_read GET /games/{id} Get details of the game.
GamesApi games_reddit_read GET /games/{id}/reddit Get a list of most recent posts from the game's subreddit.
GamesApi games_screenshots_list GET /games/{game_pk}/screenshots Get screenshots for the game.
GamesApi games_sitemap_read GET /games/sitemap Get The Sitemap Games list.
GamesApi games_stores_list GET /games/{game_pk}/stores Get links to the stores that sell the game.
GamesApi games_suggested_read GET /games/{id}/suggested Get a list of visually similar games.
GamesApi games_twitch_read GET /games/{id}/twitch Get streams on Twitch associated with the game .
GamesApi games_youtube_read GET /games/{id}/youtube Get videos from YouTube associated with the game.
GenresApi genres_list GET /genres Get a list of video game genres.
GenresApi genres_read GET /genres/{id} Get details of the genre.
PlatformsApi platforms_list GET /platforms Get a list of video game platforms.
PlatformsApi platforms_lists_parents_list GET /platforms/lists/parents Get a list of parent platforms.
PlatformsApi platforms_read GET /platforms/{id} Get details of the platform.
PublishersApi publishers_list GET /publishers Get a list of video game publishers.
PublishersApi publishers_read GET /publishers/{id} Get details of the publisher.
StoresApi stores_list GET /stores Get a list of video game storefronts.
StoresApi stores_read GET /stores/{id} Get details of the store.
TagsApi tags_list GET /tags Get a list of tags.
TagsApi tags_read GET /tags/{id} Get details of the tag.

Documentation For Models

API Docs

Link: https://rawg.io/apidocs

Documentation For Authorization

Every API request should have a User-Agent header with your app name.

Another libraries

R: rabiibouhestine/Rawg

Python: laundmo/rawgpy

Node.js: orels1/rawger

Contact

rawg's People

Contributors

uburuntu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.