-
Notifications
You must be signed in to change notification settings - Fork 3
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
Upgrade to use Challonge API v2.1 #723
Conversation
backend/siarnaq/bracket/challonge.py
Outdated
@@ -25,7 +25,7 @@ | |||
} | |||
|
|||
AUTH_TYPE = "v1" |
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.
What's 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.
Challonge's authentication version
v1 is with keys, v2 is the weird OAuth/MFA stuff that we couldn't figure out last year
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.
seems unused
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.
huh good catch
backend/siarnaq/bracket/challonge.py
Outdated
for (siarnaq_player_index, challonge_player_index) in enumerate( | ||
["player1", "player2"] | ||
): | ||
for player_index in range(2): |
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.
for player_index in range(2): | |
for (player_index, challonge_participant) in enumerate( | |
challonge_match["attributes"]["points_by_participant"] | |
): |
removes magic number 2
by lifting stuff up from l.327
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.
Have we tested bulk add teams endpoint? specifically the payload data.type being "Participant" instead of "Participants" like in the challonge docs
https://api.challonge.com/v2/api_docs/single_swagger_doc#!/Participant/bulkCreateParticipant
Also start_tournament()
's payload.data.type being "TournamentState" and payload.data.attributes.state don't seem to exist in challonge's docs
Is this just their documentation being incomplete / have you tested these functions?
weird, good catches — thanks
I did test already and all those worked, so don’t know if docs are
incomplete or just extra compatible or maybe i missed smth.
i can try porting over those calls too, anyways, if it’s helpful
…On Sat, Jan 20, 2024 at 4:08 PM Serena Li ***@***.***> wrote:
***@***.**** commented on this pull request.
Have we tested bulk add teams endpoint? specifically the payload data.type
being "Participant" instead of "Participants" like in the challonge docs
image.png (view on web)
<https://github.com/battlecode/galaxy/assets/40174697/fde20934-9868-4d0b-8777-481d7f7831f7>
https://api.challonge.com/v2/api_docs/single_swagger_doc#!/Participant/bulkCreateParticipant
Also start_tournament()'s payload.data.type being "TournamentState" and
payload.data.attributes.state don't seem to exist in challonge's docs
Is this just their documentation being incomplete / have you tested these
functions?
—
Reply to this email directly, view it on GitHub
<#723 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADK4FJAT44XIVGIQPSL3NDTYPQW5DAVCNFSM6AAAAABB3XGK6CVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMZUG4ZTCMJYGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
also seems better to be up to date with whatever docs declare anyways
…On Sat, Jan 20, 2024 at 4:24 PM Nathan Kim ***@***.***> wrote:
weird, good catches — thanks
I did test already and all those worked, so don’t know if docs are
incomplete or just extra compatible or maybe i missed smth.
i can try porting over those calls too, anyways, if it’s helpful
On Sat, Jan 20, 2024 at 4:08 PM Serena Li ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
>
> Have we tested bulk add teams endpoint? specifically the payload
> data.type being "Participant" instead of "Participants" like in the
> challonge docs
> image.png (view on web)
> <https://github.com/battlecode/galaxy/assets/40174697/fde20934-9868-4d0b-8777-481d7f7831f7>
>
> https://api.challonge.com/v2/api_docs/single_swagger_doc#!/Participant/bulkCreateParticipant
>
> Also start_tournament()'s payload.data.type being "TournamentState" and
> payload.data.attributes.state don't seem to exist in challonge's docs
>
> Is this just their documentation being incomplete / have you tested these
> functions?
>
> —
> Reply to this email directly, view it on GitHub
> <#723 (review)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADK4FJAT44XIVGIQPSL3NDTYPQW5DAVCNFSM6AAAAABB3XGK6CVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMZUG4ZTCMJYGY>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
lgtm then if all is tested
On Sat, Jan 20, 2024, 3:25 PM Nathaniel Kim ***@***.***>
wrote:
… also seems better to be up to date with whatever docs declare anyways
On Sat, Jan 20, 2024 at 4:24 PM Nathan Kim ***@***.***> wrote:
> weird, good catches — thanks
> I did test already and all those worked, so don’t know if docs are
> incomplete or just extra compatible or maybe i missed smth.
>
> i can try porting over those calls too, anyways, if it’s helpful
>
> On Sat, Jan 20, 2024 at 4:08 PM Serena Li ***@***.***>
> wrote:
>
>> ***@***.**** commented on this pull request.
>>
>> Have we tested bulk add teams endpoint? specifically the payload
>> data.type being "Participant" instead of "Participants" like in the
>> challonge docs
>> image.png (view on web)
>> <
https://github.com/battlecode/galaxy/assets/40174697/fde20934-9868-4d0b-8777-481d7f7831f7>
>>
>>
https://api.challonge.com/v2/api_docs/single_swagger_doc#!/Participant/bulkCreateParticipant
>>
>> Also start_tournament()'s payload.data.type being "TournamentState" and
>> payload.data.attributes.state don't seem to exist in challonge's docs
>>
>> Is this just their documentation being incomplete / have you tested
these
>> functions?
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <
#723 (review)>,
>> or unsubscribe
>> <
https://github.com/notifications/unsubscribe-auth/ADK4FJAT44XIVGIQPSL3NDTYPQW5DAVCNFSM6AAAAABB3XGK6CVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMZUG4ZTCMJYGY>
>> .
>> You are receiving this because you authored the thread.Message ID:
>> ***@***.***>
>>
>
—
Reply to this email directly, view it on GitHub
<#723 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJSQI2I3OYRSFPFVH6T6R3TYPQY5JAVCNFSM6AAAAABB3XGK6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGI3DQNJUGI>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
yes its summer and yes nathan is still working on this, sorry... I'm just cleaning up some easy and quick loose ends #723 (review) |
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.
lgtm pt 2
No description provided.