-
-
Notifications
You must be signed in to change notification settings - Fork 117
feat(api): add new filter options and fields to API_GetConsoleIDs endpoint #2266
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
Conversation
Co-authored-by: Wes Copeland <wlcopeland1@gmail.com>
- Added two properties to response indicating if is an active system in RA and if is a game system
|
Sorry for the amount of commits, I messed with my git and some extra commits are here despite already being merged into master |
wescopeland
left a comment
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.
Cursory glance to help steer in the right direction
- Removed helper function for system - Deleted SystemFlag and used a bool value instead - Moved all logic to endpoint file - Added tests for new filters
… field from database
|
UPDATE: OK, so I was able to push this once I shot down my local Docker instance. So maybe the problem was related to that. ORIGINAL MESSAGE: I'm facing a problem when running But I didn't change anything from I see the code causing this fail is this // TODO remove
$this->app->singleton('mysqli', function () {
try {
$db = mysqli_connect(
config('database.connections.mysql.host'),
config('database.connections.mysql.username'),
config('database.connections.mysql.password'),
config('database.connections.mysql.database'),
(int) config('database.connections.mysql.port')
);
if (!$db) {
throw new Exception('Could not connect to database. Please try again later.');
}
mysqli_set_charset($db, config('database.connections.mysql.charset'));
mysqli_query($db, "SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));");
return $db;
} catch (Exception $exception) {
if (app()->environment('local', 'testing')) {
throw $exception;
}
echo 'Could not connect to database. Please try again later.';
exit;
}
});Not sure if this should be there since there is a |
|
You should be good to open an accompanying PR in |
|
@wescopeland Docs PR opened RetroAchievements/api-docs#42 |
Co-authored-by: Wes Copeland <wlcopeland1@gmail.com>
|
Any ETA for this to be merged? |
|
We don't have a strict release schedule, however I don't believe we plan on doing a release this week. |
Added a couple of options in order to filter the response from
API_GetConsoleIDs:a: If 1, only active systems will return. Default to 0.g: If 1, only game systems will return (not Hubs, Events, etc). Default to 0.Also, added two new fields to the response indicating the value of these properties for each element in the response:
[ { "ID": 1, "Name": "Mega Drive", "IconURL": "https://static.retroachievements.org/assets/images/system/md.png", "Active": true, "IsGameSystem": true } // ... ]