Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

ahinkle
Copy link
Contributor

@ahinkle ahinkle commented Oct 27, 2020

PR allows for singular custom endpoints.

Currently, you can use custom endpoints:

rest/all/V1/foo/bar

$magento->api('foo')->get('bar');

But we are unable to use custom singular API endpoints:
rest/all/V1/foo

$magento->api('foo')->get();

@ahinkle ahinkle merged commit 6db3cf6 into master Oct 27, 2020
@ahinkle ahinkle deleted the singular-custom-endpoints branch October 27, 2020 21:57
@ahinkle
Copy link
Contributor Author

ahinkle commented Oct 27, 2020

ping @VincentBean, fyi - small changes on singular custom routes.

@VincentBean
Copy link
Contributor

Nice! Does this work for post requests too?

$magento->api('foo')->post($data);

Or do we have to do it like so:

$magento->api('foo')->post('', $data);

Thanks for the ping :)

@ahinkle
Copy link
Contributor Author

ahinkle commented Oct 30, 2020

Yeah, correct -- unfortunately, $magento->api('foo')->post('', $data); but open to PRs. 👍

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

Successfully merging this pull request may close these issues.

2 participants