Skip to content

Can get basic example working #28

Description

@palmerj

I'm on MacOS Apple silicon and have installed from pip:

igdb-api-v4 0.2.0

from igdb.wrapper import IGDBWrapper
from igdb.igdbapi_pb2 import GameResult

wrapper = IGDBWrapper("client", "secret")

byte_array = wrapper.api_request(
    'games',
    'fields name; where id = 1942;'
)

games_message = GameResult()
games_message.ParseFromString(byte_array)

# Print the results
for game in games_message:
    print(game['name'])

returns:

Traceback (most recent call last):
File "/Users/xxxx/Developer/Personal/igdb/metadata.py", line 12, in
games_message.ParseFromString(byte_array)
google.protobuf.message.DecodeError: Error parsing message

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions