s00d/larecipe-code-viewer

A LaRecipe asset.

2.1.2 2023-03-13 08:50 UTC

This package is auto-updated.

Last update: 2024-05-13 11:18:08 UTC


README

Screenshot.png

LaRecipe CodeSimples

Getting Started

  1. Install the package via composer.
composer require s00d/larecipe-code-viewer
  1. Use the provided VueJs component:
<larecipe-code-viewer url="/api/v1/users"></larecipe-code-viewer>
  1. Customize your component via props:
Prop Name Description Data Type Required Default Value
baseUrl Defines the base URL for the requests. String Optional ''
url Defines the endpoint URL for the request. String Required N/A
method Defines the HTTP method for the request. String Optional 'GET'
cookies Defines the cookies to be sent with the request. Array Optional []
header Defines the headers to be sent with the request. Array Optional []
queryString Defines the query string parameters to be sent with the request. Array Optional []
path Defines the path parameters to be sent with the request. Array Optional []
postData Defines the data to be sent with the request. Array Optional []
configs Defines the configuration options for generating code snippets for the request. Array Optional [ { snippet: 'shell', libraries: { cURL: 'curl', HTTPie: 'httpie', Wget: 'wget' } }, ... ] (an array of objects containing snippet and libraries keys)

License

This library is licensed under the MIT License - see the LICENSE.md file for details.