Skip to content

Commit

Permalink
feat: add missing examples and additional tag (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirien authored Dec 20, 2022
1 parent 95a730d commit 70ed49f
Show file tree
Hide file tree
Showing 19 changed files with 3,204 additions and 21 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ jobs:
with:
args: -p 3 release --rm-dist
version: latest
- name: Create tag
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 # tag=v6.3.3
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/sdk/${{ github.ref_name }}',
sha: context.sha
})
strategy:
fail-fast: true
matrix:
Expand Down
105 changes: 102 additions & 3 deletions docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,83 @@ This provider is designed to be a flexible extension of your Pulumi code to make

## Example

{{< chooser language "typescript,python,go,csharp" >}}
{{< chooser language "javascript,typescript,python,go,csharp" >}}

{{% choosable language javascript %}}

```javascript
"use strict";
const purrl = require("@pulumiverse/purrl")

const purrlCommand = new purrl.Purrl("purrl", {
name: "httpbin",
url: "https://httpbin.org/get",
method: "GET",
headers: {
"test": "test",
},
responseCodes: [
"200"
],
deleteMethod: "DELETE",
deleteUrl: "https://httpbin.org/delete",
deleteResponseCodes: [
"200"
],
});

exports.response = purrlCommand.response;
```

{{% /choosable %}}

{{% choosable language typescript %}}

TODO
```typescript
import * as purrl from "@pulumiverse/purrl";

let purrlCommand = new purrl.Purrl("purrl", {
name: "httpbin",
url: "https://httpbin.org/get",
method: "GET",
headers: {
"test": "test",
},
responseCodes: [
"200"
],
deleteMethod: "DELETE",
deleteUrl: "https://httpbin.org/delete",
deleteResponseCodes: [
"200"
],
});

export const url = purrlCommand.response
```

{{% /choosable %}}
{{% choosable language python %}}

TODO
```python
import pulumiverse_purrl as purrl
import pulumi

purrl_command = purrl.Purrl("purrl-python", name="purrl-python",
method="GET",
headers={
"test": "test"
},
url="https://httpbin.org/get",
response_codes=[
"200"],
delete_method="DELETE",
delete_url="https://httpbin.org/delete",
delete_response_codes=["200"]
)

pulumi.export("response", purrl_command.response)
```

{{% /choosable %}}
{{% choosable language go %}}
Expand Down Expand Up @@ -58,4 +126,35 @@ func main() {

{{% /choosable %}}

{{% choosable language csharp %}}

```csharp
using System.Collections.Generic;
using Pulumi;
using Pulumiverse.Purrl;

return await Deployment.RunAsync(() =>
{
var purrl =new Purrl("purrl", new PurrlArgs
{
Name = "httpbin",
Url = "https://httpbin.org/get",
ResponseCodes = new List<string> { "200" },
Method = "GET",
Headers = new Dictionary<string, string> { { "test", "test" } },
DeleteMethod = "DELETE",
DeleteUrl = "https://httpbin.org/delete",
DeleteResponseCodes = new List<string> { "200" },
});

// Export outputs here
return new Dictionary<string, object?>
{
["response"] =purrl.Response
};
});
```

{{% /choosable %}}

{{< /chooser >}}
Loading

0 comments on commit 70ed49f

Please sign in to comment.