Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
feat: adds documentation for all Go endpoints (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
brigonzalez authored Jun 10, 2022
1 parent 692a4db commit 024687c
Show file tree
Hide file tree
Showing 13 changed files with 609 additions and 47 deletions.
28 changes: 14 additions & 14 deletions source/includes/api-reference/_applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -124,7 +124,7 @@ func main() {
"token:pci:read:low",
})

application, response, err := apiClient.ApplicationsApi.ApplicationsCreate(contextWithAPIKey).CreateApplicationRequest(createApplicationRequest).Execute()
application, httpResponse, err := apiClient.ApplicationsApi.Create(contextWithAPIKey).CreateApplicationRequest(createApplicationRequest).Execute()
}
```

Expand Down Expand Up @@ -214,7 +214,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -224,7 +224,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

applications, response, err := apiClient.ApplicationsApi.ApplicationsGet(contextWithAPIKey).Execute()
applications, httpResponse, err := apiClient.ApplicationsApi.Get(contextWithAPIKey).Execute()
}
```

Expand Down Expand Up @@ -320,7 +320,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -330,7 +330,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

application, response, err := apiClient.ApplicationsApi.ApplicationsGetById(contextWithAPIKey, "fe1f9ba4-474e-44b9-b949-110cdba9d662").Execute()
application, httpResponse, err := apiClient.ApplicationsApi.GetById(contextWithAPIKey, "fe1f9ba4-474e-44b9-b949-110cdba9d662").Execute()
}
```

Expand Down Expand Up @@ -417,7 +417,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -427,7 +427,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

application, response, err := apiClient.ApplicationsApi.ApplicationsGetByKey(contextWithCreatedAppAPIKey).Execute()
application, httpResponse, err := apiClient.ApplicationsApi.GetByKey(contextWithCreatedAppAPIKey).Execute()
}
```

Expand Down Expand Up @@ -538,7 +538,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -554,7 +554,7 @@ func main() {
"application:read",
})

application, response, err := apiClient.ApplicationsApi.ApplicationsUpdate(contextWithAPIKey, "fb124bba-f90d-45f0-9a59-5edca27b3b4a").UpdateApplicationRequest(updateApplicationRequest).Execute()
application, httpResponse, err := apiClient.ApplicationsApi.Update(contextWithAPIKey, "fb124bba-f90d-45f0-9a59-5edca27b3b4a").UpdateApplicationRequest(updateApplicationRequest).Execute()
}
```

Expand Down Expand Up @@ -649,7 +649,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -659,7 +659,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

application, response, err := apiClient.ApplicationsApi.ApplicationsRegenerateKey(contextWithAPIKey, "fb124bba-f90d-45f0-9a59-5edca27b3b4a").Execute()
application, httpResponse, err := apiClient.ApplicationsApi.RegenerateKey(contextWithAPIKey, "fb124bba-f90d-45f0-9a59-5edca27b3b4a").Execute()
}
```

Expand Down Expand Up @@ -754,7 +754,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -764,7 +764,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

response, err := apiClient.ApplicationsApi.ApplicationsDelete(contextWithAPIKey, "fb124bba-f90d-45f0-9a59-5edca27b3b4a").Execute()
httpResponse, err := apiClient.ApplicationsApi.Delete(contextWithAPIKey, "fb124bba-f90d-45f0-9a59-5edca27b3b4a").Execute()
}
```

Expand Down
2 changes: 1 addition & 1 deletion source/includes/api-reference/_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pip install basistheory
```

```go
go get github.com/Basis-Theory/basistheory-go/v2
go get github.com/Basis-Theory/basistheory-go/v3
```

Our SDKs enable you to quickly and easily integrate with the API. Select one of the language tabs to see instructions on how to install the SDK and view code examples in that language.
Expand Down
19 changes: 19 additions & 0 deletions source/includes/api-reference/_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ with basistheory.ApiClient(configuration=basistheory.Configuration(api_key="key_
logs = logs_client.get()
```

```go
package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
configuration := basistheory.NewConfiguration()
apiClient := basistheory.NewAPIClient(configuration)
contextWithAPIKey := context.WithValue(context.Background(), basistheory.ContextAPIKeys, map[string]basistheory.APIKey{
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

logs, httpResponse, err := apiClient.LogsApi.Get(contextWithAPIKey).Execute()
}
```

> Response
```json
Expand Down
19 changes: 19 additions & 0 deletions source/includes/api-reference/_pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ with basistheory.ApiClient(configuration=basistheory.Configuration(api_key="key_
applications = applications_client.get(page=2, size=10)
```

```go
package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
configuration := basistheory.NewConfiguration()
apiClient := basistheory.NewAPIClient(configuration)
contextWithAPIKey := context.WithValue(context.Background(), basistheory.ContextAPIKeys, map[string]basistheory.APIKey{
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

applications, httpResponse, err := apiClient.ApplicationsApi.Get(contextWithAPIKey).Page(2).Size(10).Execute()
}
```

> Response
```json
Expand Down
19 changes: 19 additions & 0 deletions source/includes/api-reference/_permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,25 @@ with basistheory.ApiClient(configuration=basistheory.Configuration(api_key="key_
permissions = permissions_client.get()
```

```go
package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
configuration := basistheory.NewConfiguration()
apiClient := basistheory.NewAPIClient(configuration)
contextWithAPIKey := context.WithValue(context.Background(), basistheory.ContextAPIKeys, map[string]basistheory.APIKey{
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

permissions, httpResponse, err := apiClient.PermissionsApi.Get(contextWithAPIKey).Execute()
}
```

### Query Parameters

| Parameter | Required | Type | Default | Description |
Expand Down
22 changes: 12 additions & 10 deletions source/includes/api-reference/_proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -107,7 +107,8 @@ func main() {
createProxyRequest.SetRequestReactorId("5b493235-6917-4307-906a-2cd6f1a90b13")
createProxyRequest.SetResponseReactorId("1cb923e6-ae89-407a-ba07-1564ebe99350")
createProxyRequest.SetRequireAuth(true)
proxy, response, err := apiClient.ProxiesApi.ProxiesCreate(contextWithAPIKey).CreateProxyRequest(createProxyRequest).Execute()

proxy, httpResponse, err := apiClient.ProxiesApi.Create(contextWithAPIKey).CreateProxyRequest(createProxyRequest).Execute()
}
```

Expand Down Expand Up @@ -197,7 +198,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -207,7 +208,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

proxies, response, err := apiClient.ProxiesApi.ProxiesGet(contextWithAPIKey).Execute()
proxies, httpResponse, err := apiClient.ProxiesApi.Get(contextWithAPIKey).Execute()
}
```

Expand Down Expand Up @@ -303,7 +304,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -313,7 +314,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

proxy, response, err := apiClient.ProxiesApi.ProxiesGetById(contextWithAPIKey, "433013a6-a614-4e1e-b2aa-5fba67aa85e6").Execute()
proxy, httpResponse, err := apiClient.ProxiesApi.GetById(contextWithAPIKey, "433013a6-a614-4e1e-b2aa-5fba67aa85e6").Execute()
}
```

Expand Down Expand Up @@ -430,7 +431,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -444,7 +445,8 @@ func main() {
updateProxyRequest.SetRequestReactorId("5b493235-6917-4307-906a-2cd6f1a90b13")
updateProxyRequest.SetResponseReactorId("1cb923e6-ae89-407a-ba07-1564ebe99350")
updateProxyRequest.SetRequireAuth(true)
proxy, response, err := apiClient.ProxiesApi.ProxiesUpdate(contextWithAPIKey, "433013a6-a614-4e1e-b2aa-5fba67aa85e6").UpdateProxyRequest(updateProxyRequest).Execute()

proxy, httpResponse, err := apiClient.ProxiesApi.Update(contextWithAPIKey, "433013a6-a614-4e1e-b2aa-5fba67aa85e6").UpdateProxyRequest(updateProxyRequest).Execute()
}
```

Expand Down Expand Up @@ -543,7 +545,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -553,7 +555,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

response, err := apiClient.ProxiesApi.ProxiesDelete(contextWithAPIKey, "433013a6-a614-4e1e-b2aa-5fba67aa85e6").Execute()
httpResponse, err := apiClient.ProxiesApi.Delete(contextWithAPIKey, "433013a6-a614-4e1e-b2aa-5fba67aa85e6").Execute()
}
```

Expand Down
20 changes: 10 additions & 10 deletions source/includes/api-reference/_reactor_formulas.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand Down Expand Up @@ -338,7 +338,7 @@ func main() {
requestParameters = append(requestParameters, reactorFormulaRequestParameter2)
createReactorFormulaRequest.SetRequestParameters(requestParameters)

reactorFormula, response, err := apiClient.ReactorFormulasApi.ReactorFormulasCreate(contextWithAPIKey).CreateReactorFormulaRequest(createReactorFormulaRequest).Execute()
reactorFormula, httpResponse, err := apiClient.ReactorFormulasApi.Create(contextWithAPIKey).CreateReactorFormulaRequest(createReactorFormulaRequest).Execute()
}
```

Expand Down Expand Up @@ -458,7 +458,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -468,7 +468,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

reactorFormulas, response, err := apiClient.ReactorFormulasApi.ReactorFormulasGet(contextWithAPIKey).Execute()
reactorFormulas, httpResponse, err := apiClient.ReactorFormulasApi.Get(contextWithAPIKey).Execute()
}
```

Expand Down Expand Up @@ -591,7 +591,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -601,7 +601,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

reactorFormula, response, err := apiClient.ReactorFormulasApi.ReactorFormulasGetById(contextWithAPIKey, "17069df1-80f4-439e-86a7-4121863e4678").Execute()
reactorFormula, httpResponse, err := apiClient.ReactorFormulasApi.GetById(contextWithAPIKey, "17069df1-80f4-439e-86a7-4121863e4678").Execute()
}
```

Expand Down Expand Up @@ -869,7 +869,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand Down Expand Up @@ -909,7 +909,7 @@ func main() {
requestParameters = append(requestParameters, reactorFormulaRequestParameter2)
updateReactorFormulaRequest.SetRequestParameters(requestParameters)

reactorFormula, response, err := apiClient.ReactorFormulasApi.ReactorFormulasUpdate(contextWithAPIKey, "17069df1-80f4-439e-86a7-4121863e4678").UpdateReactorFormulaRequest(updateReactorFormulaRequest).Execute()
reactorFormula, httpResponse, err := apiClient.ReactorFormulasApi.Update(contextWithAPIKey, "17069df1-80f4-439e-86a7-4121863e4678").UpdateReactorFormulaRequest(updateReactorFormulaRequest).Execute()
}
```

Expand Down Expand Up @@ -1035,7 +1035,7 @@ package main

import (
"context"
"github.com/Basis-Theory/basistheory-go/v2"
"github.com/Basis-Theory/basistheory-go/v3"
)

func main() {
Expand All @@ -1045,7 +1045,7 @@ func main() {
"ApiKey": {Key: "key_N88mVGsp3sCXkykyN2EFED"},
})

response, err := apiClient.ReactorFormulasApi.ReactorFormulasDelete(contextWithAPIKey, "17069df1-80f4-439e-86a7-4121863e4678").Execute()
httpResponse, err := apiClient.ReactorFormulasApi.Delete(contextWithAPIKey, "17069df1-80f4-439e-86a7-4121863e4678").Execute()
}
```

Expand Down
Loading

0 comments on commit 024687c

Please sign in to comment.