Skip to content

Commit 95d47c2

Browse files
authored
Merge pull request #4 from twitchtv/v4
Update to v4
2 parents 4cf9bc9 + a56b819 commit 95d47c2

File tree

9 files changed

+2908
-7089
lines changed

9 files changed

+2908
-7089
lines changed

.github/workflows/python-publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v2
1919
with:
20-
python-version: '3.x'
20+
python-version: '3.8'
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
24+
pip install setuptools wheel twine pipenv
25+
pipenv install --dev
2526
- name: Build and publish
2627
env:
2728
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ protobuf = "*"
1414
requests = "*"
1515

1616
[requires]
17-
python_version = "3.7"
17+
python_version = "3.8"

Pipfile.lock

Lines changed: 161 additions & 219 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ A Python wrapper for IGDB.com's Video Game Database API.
33

44
__IMPORTANT__
55

6-
This wrapper is ONLY compatible with the newest release (V3).
6+
This wrapper is ONLY compatible with the newest release (V4).
77

88
## About IGDB
99
One of the principles behind IGDB.com is accessibility of data. We wish to share the data with anyone who wants to build cool video game oriented websites, apps and services. This means that the information you contribute to IGDB.com can be used by other projects as well.
@@ -26,18 +26,18 @@ The package contains two modules: the `wrapper` which holds the tools for queryi
2626
# Installation and Setup
2727

2828
```py
29-
pip install igdb-api-v3
29+
pip install igdb-api-v4
3030
```
3131

3232
# Usage
3333

34-
## Using your API key
34+
## Using your Twitch Credentials
3535

36-
Create a new IGDBWrapper object and give it your API key:
36+
Create a new IGDBWrapper object and give it your Client-ID and App Access Token:
3737

3838
```py
3939
from igdb.wrapper import IGDBWrapper
40-
wrapper = IGDBWrapper("YOUR_API_KEY")
40+
wrapper = IGDBWrapper("YOUR_CLIENT_ID", "YOUR_APP_ACCESS_TOKEN")
4141
```
4242

4343
## How to use the wrapper
@@ -73,4 +73,36 @@ The wrapper throws a [`requests.HTTPError`](https://2.python-requests.org/en/mas
7373

7474
## Code Examples
7575

76-
TBD
76+
# Contributing / Developers
77+
78+
## Setup
79+
### Python
80+
This project uses Python 3.7+ and pipenv to manage dependencies.
81+
```
82+
pip install --user pipenv
83+
pipenv install --dev
84+
```
85+
86+
### Protocol Buffers
87+
#### Windows
88+
This project uses (protoc)[https://github.com/protocolbuffers/protobuf/releases] to generate the protocol buffer wrapper.
89+
```
90+
set PB_REL="https://github.com/protocolbuffers/protobuf/releases"
91+
set PB_VERSION=3.13.0
92+
set PB_OS=win
93+
set PB_ARCH=64
94+
curl -LO %PB_REL%/download/v%PB_VERSION%/protoc-%PB_VERSION%-%PB_OS%%PB_ARCH%.zip
95+
```
96+
97+
Unzip to a protoc folder.
98+
```
99+
cd protoc-3.13.0-win64\bin
100+
protoc.exe -I=../../src/igdb --python_out=../../src/igdb igdbapi.proto
101+
```
102+
103+
104+
### Mac
105+
Then run protoc:
106+
```
107+
protoc -I=. --python_out=. igdbapi.proto
108+
```

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
long_description = fh.read()
55

66
setup(
7-
name="igdb-api-v3",
8-
version="0.0.2",
7+
name="igdb-api-v4",
8+
version="0.0.3",
99
author="Felix Nordén",
1010
author_email="[email protected]",
11-
description="An API wrapper for IGDB API v3",
11+
description="An API wrapper for IGDB API v4",
1212
long_description=long_description,
1313
long_description_content_type="text/markdown",
14-
url="https://github.com/igdb/igdb-api-python/",
14+
url="https://github.com/twitchtv/igdb-api-python/",
1515
classifiers=[
1616
"Programming Language :: Python :: 3",
1717
"License :: OSI Approved :: MIT License",

0 commit comments

Comments
 (0)