te25son / Jokes

CLI app for jokes
0 stars 0 forks source link

Submit jokes with the CLI #6

Closed te25son closed 1 year ago

te25son commented 2 years ago

The JokeAPI is not only capable of getting jokes, you can also create new jokes. It would be interesting if the CLI was extended to also add jokes using the submit endpoint.

In order to do this we would have to update the current CLI command, possibly by using the @click.group() decorator like this:

@click.group()
def jokes():
    ...

@jokes.command() # @jokes not @click
def get():
    ...

@jokes.command() # @jokes not @click
def add():
    ...

Steps

te25son commented 1 year ago

Jokes API has turned off the ability to submit jokes "for the foreseeable future", and all work related to this was removed in #29, so closing this until the functionality comes back.

Screenshot 2022-11-27 at 17 59 00