yadutaf / ovh-cli

Bare simple Command Line Interface (CLI) for OVH.
Other
31 stars 13 forks source link

api email Unknown route #14

Closed Sylvain303 closed 7 years ago

Sylvain303 commented 7 years ago

It doesn't see email API? Or did I miss something?

GET /email/domain/{domain}

./ovh-eu email help
Unknown route /email
yadutaf commented 7 years ago

The trick is: there is no top level "email" API. There are 3 sub-level APIs though:

./ovh-eu --help | grep email
    email-imap-copy                 Copy messages between two mailboxes
    email-exchange                  Operations about the EXCHANGE service
    email-domain                    Operations about the MX service
Sylvain303 commented 7 years ago

OK, thanks.

What is the "algorithm" to convert from REST url to command line? When (why) such "trick" appears?

yadutaf commented 7 years ago

Each top level API is mapped to a top level command. Some top level commands have a "/" in it, it is replaces by a '-'