danielgtaylor / restish

Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in
https://rest.sh/
MIT License
900 stars 74 forks source link

Expand documentation on external-tool auth #256

Closed fflores97 closed 4 months ago

fflores97 commented 4 months ago

Hi! Loving restish from what I've used it.

I found myself struggling to get some APIs to play nice with restish's OAuth system (mostly them not implementing the standard protocol but quirky variants of it), and ended up using external-tool with some scripts. I struggled with the format because my brain isn't wired to work in the format the tool expects, so I wanted to help out and make the docs more explicit. I actually originally came up with a whole concept for a file-based auth system, but then realized I was way over-complicating just using external-tool.

I also provided a sample jq one-liner that could help someone in the same position as me. Maybe this helps the adoption seeing it's so easy to integrate your own scripts into restish.

Anyway, let me know if I can help further.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 76.86%. Comparing base (d16bdd7) to head (1c28743). Report is 8 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/danielgtaylor/restish/pull/256/graphs/tree.svg?width=650&height=150&src=pr&token=1BMagYibk9&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor)](https://app.codecov.io/gh/danielgtaylor/restish/pull/256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor) ```diff @@ Coverage Diff @@ ## main #256 +/- ## ======================================= Coverage 76.86% 76.86% ======================================= Files 26 26 Lines 3679 3679 ======================================= Hits 2828 2828 Misses 643 643 Partials 208 208 ``` ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/danielgtaylor/restish/pull/256?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/danielgtaylor/restish/pull/256?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor). Last update [d16bdd7...1c28743](https://app.codecov.io/gh/danielgtaylor/restish/pull/256?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniel+G.+Taylor).