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 API type for group applications #933

Open
GAsplund opened this issue Jan 4, 2025 · 2 comments
Open

New API type for group applications #933

GAsplund opened this issue Jan 4, 2025 · 2 comments

Comments

@GAsplund
Copy link
Member

GAsplund commented Jan 4, 2025

Having developed on a new application, CashIT, I saw that the INFO API type would not be enough for this use case. According to the current design, the application must be able to:

  • Fetch the name of any group
    Allows the name of a group to be displayed in tables when the current user is not a part of that group
  • Fetch the members of any group
    This information is needed so that forms can be pre-filled with the members of a group
  • Fetch the name of any member
    This information is needed so that tables can be filled in lists

There are probably more use cases here, but I probably forgot about them.

The reason that this needs to be done on an API-level is that in this case, the division treasurer should be able to make changed on behalf of another group.

I propose a new API type with the following endpoints:

  • /group - Get information about a group. The data structure could be as follows:
{
  id: string;
  name: string;
  prettyName: string;
  groupMembers: {
    id: string;
    nick: string;
    firstName: string;
    lastName: string;
  }[];
  superGroup: {
    id: string;
    name: string;
    prettyName: string;
    type: string;
  }
}
  • /user - Get information about a given user
    Same structure as /user is today on the INFO API type
@Portals
Copy link
Member

Portals commented Jan 6, 2025

Would the name group be a good enough name for the API?

@GAsplund
Copy link
Member Author

GAsplund commented Jan 6, 2025

Yeah, that seems like a good fit

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