-
-
Notifications
You must be signed in to change notification settings - Fork 43
Feat/add igdb rawg providers #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I don't know if this was already accounted for, but since obsidian version 1.11 a new Keychain settings section was added for storing plugin secrets. Since RAWG uses a secret I thought it may be a useful piece of info. |
|
Thanks for the note. I am aware of the new Keychain settings introduced in Obsidian 1.11. However, I opted to place these credentials within the plugin's own settings to ensure consistency with how other APIs in the project currently handle their keys. If preferred, I can refactor this to utilize the new secret storage system. |
src/api/apis/IGDBAPI.ts
Outdated
|
|
||
| export class IGDBAPI extends APIModel { | ||
| plugin: MediaDbPlugin; | ||
| // DÜZELTME 1: Formatı ISO standartına (YYYY-MM-DD) çektik |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the code and comments in English.
src/api/apis/IGDBAPI.ts
Outdated
| throw Error(`MDB | Received status code ${response.status} from ${this.apiName}.`); | ||
| } | ||
|
|
||
| const data = response.json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add types to the response object? By that, I mean define a TypeScript interface that models the JSON response's data structure. That way, accessing the data to create the individual search results is a bit safer and easier to follow. (This applies to all cases where you get a response object from a request)
src/main.ts
Outdated
| @@ -62,6 +64,9 @@ export default class MediaDbPlugin extends Plugin { | |||
| this.apiManager.registerAPI(new MobyGamesAPI(this)); | |||
| this.apiManager.registerAPI(new GiantBombAPI(this)); | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick, but please no empty line here.
Description
This PR integrates IGDB and RAWG APIs into the plugin, allowing users to search for games using these services. It also includes several fixes and improvements.
Changes
Testing
How to use
Setting up IGDB
To use the IGDB API, you need to generate a Client ID and Client Secret.
Setting up RAWG
This PR was created with mostly 'vibe coding'.
📸 Screenshots