diff --git a/.gitignore b/.gitignore index 722ebf9..f019405 100644 --- a/.gitignore +++ b/.gitignore @@ -122,4 +122,7 @@ dmypy.json ### Python Patch ### .venv/ +# macOS +.DS_Store + # End of https://www.gitignore.io/api/python diff --git a/README.md b/README.md index 9b8b24d..a49d4f2 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ # Python Apicalypse Client + +Apicalypse is a simple query language that allows you to easily GET data from API’s. The query can be attached to any GET request as a URL parameter or in the body of the request. + +This is the Python client to use the IGDB v3 API. diff --git a/apicalypse.py b/apicalypse.py index b1d1f02..682caf0 100644 --- a/apicalypse.py +++ b/apicalypse.py @@ -40,9 +40,9 @@ def search(self, search): def filter(self, filters): if filters: if isinstance(filters, list): - self.filter_array.append(f'filter {" & ".join(filters)}') + self.filter_array.append(f'where {" & ".join(filters)}') else: - self.filter_array.append(f'filter {filters.strip()}') + self.filter_array.append(f'where {filters.strip()}') return self def construct_options(self, url): @@ -71,7 +71,7 @@ def request(self, url): return response.json() def main(): - url = 'https://endpoint-alpha.igdb.com/games/' + url = 'https://api-v3.igdb.com/games/' igdb = apicalypse({ 'headers': { 'Accept': 'application/json', @@ -83,4 +83,4 @@ def main(): print(igdb.request(url)) if __name__ == "__main__": - main() \ No newline at end of file + main()