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

Shorten API calls #506

Merged
merged 3 commits into from Apr 5, 2019

Conversation

Projects
None yet
2 participants
@xh3n1
Copy link
Member

commented Mar 25, 2019

Description

Added api.php in lists which is needed to create shorters API calls.
The new base url will be : http://example.com/lists/api.php/
Example: http://example.com/lists/api.php/sessions

Will push changes to core repo too.
To do: Fix the tests. Remove strict_types as it's not supported in old versions of PHP and add a PHP version check.

Related Issue

https://mantis.phplist.org/view.php?id=19847

Shorten API calls
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
@samtuke

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

@xh3n1 Could /api.php be made even shorter by changing it to /api/ using mod_rewrite?

@xh3n1

This comment has been minimized.

Copy link
Member Author

commented Mar 25, 2019

@samtuke yes, I can do so, but they would still need to use api.php if they don't have mod_rewrite enabled.

@samtuke

This comment has been minimized.

Copy link
Contributor

commented Mar 25, 2019

@xh3n1 What's your view on that? The increase in possible URLs is undesirable, but perhaps worth it to have shorter and cleaner URLs.

Add rewrite rule and PHP version check
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
@xh3n1

This comment has been minimized.

Copy link
Member Author

commented Mar 27, 2019

Done.
Changes in phpList4: phpList/core@5ae3882
phpList/rest-api@7d2145f

Add v2
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>

@samtuke samtuke merged commit f67d196 into master Apr 5, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@samtuke samtuke deleted the entrypoint branch Apr 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.