Skip to content
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

feat: add competition ranking to leaderboard #439

Merged
merged 10 commits into from
Feb 12, 2025
Merged

feat: add competition ranking to leaderboard #439

merged 10 commits into from
Feb 12, 2025

Conversation

virratanasangpunth
Copy link
Contributor

No description provided.

Copy link
Contributor

@malandis malandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple changes upon review:

  • An oversight from the previous PR: I should have re-used FetchResponse for get_rank instead of making a new response type. Could you refactor get_competition_rank to use FetchResponse instead of a new response type here as well?
  • Also refactor get_rank to use the same

src/leaderboard/messages/data/delete.rs Show resolved Hide resolved
src/leaderboard/messages/data/get_competition_rank.rs Outdated Show resolved Hide resolved
src/leaderboard/messages/data/get_competition_rank.rs Outdated Show resolved Hide resolved
@virratanasangpunth
Copy link
Contributor Author

virratanasangpunth commented Feb 12, 2025

GH Actions seem to checkout older code revisions of this PR.... odd....

@virratanasangpunth
Copy link
Contributor Author

https://github.com/momentohq/client-sdk-rust/actions/runs/13294066680/job/37121603883?pr=439

It's complaning about:

error[E0061]: this method takes 1 argument but 2 arguments were supplied
   --> tests/leaderboard/mod.rs:415:14
    |
415 |             .get_competition_rank([0, 1, 2, 3, 4], Some(Order::Ascending))
    |              ^^^^^^^^^^^^^^^^^^^^                  ---------------------- unexpected argument #2 of type `std::option::Option<momento::leaderboard::Order>`

but that doesn't match the code in this PR: 5d07ce6#diff-fd78100889d055010c44e3f81caf0225a1545b419395f83c7823dfd764eee13fR415

        let response = leaderboard
            .send_request(GetCompetitionRankRequest::new([0, 1, 2, 3, 4]).order(Order::Ascending))
            .await?;

Copy link
Contributor

@malandis malandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@virratanasangpunth virratanasangpunth merged commit df4bd46 into main Feb 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants