Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Possible Automation? #66

Open
ahmadawais opened this issue Apr 19, 2017 · 9 comments · May be fixed by #70
Open

Possible Automation? #66

ahmadawais opened this issue Apr 19, 2017 · 9 comments · May be fixed by #70

Comments

@ahmadawais
Copy link

Is it possible to automate the process?

  • Install the plugin
  • Code that creates and app
  • Gets the passwords and uses it in the cURL requests.
@mAAdhaTTah
Copy link

You could probably do a bunch of that w/ WP-CLI, although I was just stopping by to check if there was a command to create a new application password, as I'm trying to do something I suspect similar to you (automate API testing).

@ahmadawais
Copy link
Author

Nothing so far. Maybe we should ask @georgestephanis 🤔

@georgestephanis
Copy link
Collaborator

Wpcli command? Sure, I'll write it today.

@ahmadawais
Copy link
Author

@georgestephanis while that would be awesome — if there's an API to automate the process

  • Install the plugin
  • Code that creates and app
  • Gets the passwords and uses it in the cURL requests.

That would be awesome!

@mAAdhaTTah
Copy link

@ahmadawais The rest of those steps can be automated in bash w/ wp-cli, it doesn't have to be specific to this project.

@mAAdhaTTah
Copy link

@georgestephanis Thanks so much!

@ahmadawais
Copy link
Author

@mAAdhaTTah I know bash and I know that could be done. But having it as an API to be used in PHP/JS would make things far more easier!

@mAAdhaTTah
Copy link

@ahmadawais WP_CLI::runcommand will allow you to call into WP_CLI commands in PHP rather than bash. I believe there's a wp-cli wrapper for node.js.

My point is just that the automation workflow you're looking for is going to be pretty specific to your use case and not something that should be added to an application passwords plugin.

@ahmadawais
Copy link
Author

@mAAdhaTTah Not every server out there has WPCLI installed. So, an API is more powerful than support for WPCLI. Though, I welcome the WPCLI support here.

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

Successfully merging a pull request may close this issue.

4 participants