Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Allow calling generic APIs #333

Open
gprossliner opened this issue May 17, 2021 · 1 comment
Open

Allow calling generic APIs #333

gprossliner opened this issue May 17, 2021 · 1 comment

Comments

@gprossliner
Copy link

There is a "callAPI" method:

func (client *Client) callAPI(
ctx context.Context, method, endpoint string, input, output interface{},
) (*ErrorInfo, error) {
// prepare request

This is currently private. It would be nice if the User can call any APIs that are not implemented (yet), like /authz/shares. See #332.

I would suggest renaming callAPI to CallAPI to make it public, or provide a equivalent public method.

@gprossliner
Copy link
Author

On implementing the PR, I figured out that just make the func public will not be as useful, as this doen't allow to pass in a relative URL. So I reimplemented it with a "Generic" endpoint. The existing "util.go" file remains unchanged.
New PR #335

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant