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

New endpoint #42

Closed
tentamens opened this issue Jul 1, 2024 · 10 comments
Closed

New endpoint #42

tentamens opened this issue Jul 1, 2024 · 10 comments
Assignees

Comments

@tentamens
Copy link
Member

Make an endpoint that I call on start up and notifies the user if they had XP removed for added from their account. Example, placing top ten in the leaderboard or got XP removed because they took the wrong image of an item ext.

@tentamens
Copy link
Member Author

I will be displaying the content returned so it is customizable as well as having different variations of "popups"
Right now I have reward, penalty, info, legal, and update. You don't have to worry much about these, but you will have to return me a number corresponding to the type of popup.

Now for the actually content it will be rendering, I will need the header, body, and reward, these will all be in the form of text. And once I finish making all these widgets I will write prompts for you

@tentamens
Copy link
Member Author

For Rewards, all we have right now are the leaderboard so
For placing (top ten, top twenty, 1st, 2nd, 3rd) in the (daily, weekly) leaderboard you have been awarded
For uploading an incorrect image, you have deducted
obviously we can add more at any time without any changes to the front-end, so it doesn't really madder that much what they are now

@tentamens
Copy link
Member Author

Also we can use this endpoint for changing numbers of the frontend like multipliers or leaderboard rewards. So add support for that aswell

@Ekwav
Copy link
Member

Ekwav commented Jul 4, 2024

What format should the response have?
Also, wouldn't you want a list of recent exp changes? Like just requesting the latest one may miss one

@tentamens
Copy link
Member Author

The response could just be an array of dictionaries, each dictionary being a "notifier"
The type of if notifier would be a string reward, penalty, info, legal, and update. Header String, Body string, Reward String
For changes in frontend numbers like rewards you can put a bool and data this is all I have for now
dailyBonusesList = [1.25, 2, 4];
leaderboardBaseRewardsList = [1000, 3000];
leaderboardTopThree = [
[3000, 2000, 1000],
[6000, 3000, 2000]
];

@Ekwav
Copy link
Member

Ekwav commented Jul 7, 2024

I didn't get your message.
How about this:

[
  {
    "description":"Finished at #1 on the daily leaderbaord",
    "reference":"2024-07-08",
    "type":"leaderbaord",
    "timestamp": "2024-07-08T0:04:10.329Z",
    "effect":4000
  },
  {
    "description":"Image does not contain a window",
    "reference":"b0d070d6-702b-4242-ab29-f5410b2a2c92",
    "type":"image_check",
    "timestamp": "2024-07-07T23:54:20.032Z",
    "effect":-400
  }
]

The type defines what source the change came from.
Reference is an unique id for the change (boardname for leaderbaord, image id for images) changes based on type.
The effect is by how much the exp changed.
The description is text that can be displayed to the user.
The timestamp states when the change happened. (mostly for ordering)

@tentamens
Copy link
Member Author

Yeah, that works

@tentamens
Copy link
Member Author

Also for testing can you make it always return all of them

@Ekwav Ekwav closed this as completed in e2c3a8e Jul 8, 2024
@tentamens
Copy link
Member Author

Also for testing can you make it always return all of them

This

@tentamens tentamens reopened this Jul 10, 2024
@Ekwav
Copy link
Member

Ekwav commented Jul 10, 2024

It does return you all of them. All in the last 30 days (that is how long they are stored)

@Ekwav Ekwav closed this as completed Jul 10, 2024
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

No branches or pull requests

2 participants