Skip to content

Commit

Permalink
verify generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere committed Oct 12, 2023
1 parent 500219f commit 01589c0
Show file tree
Hide file tree
Showing 1,512 changed files with 76,870 additions and 71,011 deletions.
2 changes: 1 addition & 1 deletion rest/accounts/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is the public Twilio REST API.
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/twilio-oai](https://github.com/twilio/twilio-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 1.50.1
- API version: 1.0.0
- Package version: 1.0.0
- Build package: com.twilio.oai.TwilioGoGenerator
For more information, please visit [https://support.twilio.com](https://support.twilio.com)
Expand Down
6 changes: 3 additions & 3 deletions rest/accounts/v1/api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package openapi

import (
twilio "github.com/twilio/twilio-go/client"
twilio "github.com/twilio/twilio-go/client"
)

type ApiService struct {
Expand All @@ -24,12 +24,12 @@ type ApiService struct {
}

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService {
return &ApiService{
return &ApiService {
requestHandler: requestHandler,
baseURL: "https://accounts.twilio.com",
}
}

func NewApiServiceWithClient(client twilio.BaseClient) *ApiService {
return NewApiService(twilio.NewRequestHandler(client))
return NewApiService(twilio.NewRequestHandler(client))
}
33 changes: 20 additions & 13 deletions rest/accounts/v1/auth_tokens_promote.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,34 @@ package openapi

import (
"encoding/json"
"fmt"

Check failure on line 19 in rest/accounts/v1/auth_tokens_promote.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.15)

imported and not used: "fmt"
"net/url"

"github.com/twilio/twilio-go/client"

Check failure on line 22 in rest/accounts/v1/auth_tokens_promote.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.15)

imported and not used: "github.com/twilio/twilio-go/client"
)


// Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.
func (c *ApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion, error) {
path := "/v1/AuthTokens/Promote"
path := "/v1/AuthTokens/Promote"

data := url.Values{}
headers := make(map[string]interface{})



data := url.Values{}
headers := make(map[string]interface{})

resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
}
resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
}

defer resp.Body.Close()
defer resp.Body.Close()

ps := &AccountsV1AuthTokenPromotion{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
ps := &AccountsV1AuthTokenPromotion{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}

return ps, err
return ps, err
}
56 changes: 33 additions & 23 deletions rest/accounts/v1/auth_tokens_secondary.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,54 @@ package openapi

import (
"encoding/json"
"fmt"

Check failure on line 19 in rest/accounts/v1/auth_tokens_secondary.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.15)

imported and not used: "fmt"
"net/url"

"github.com/twilio/twilio-go/client"

Check failure on line 22 in rest/accounts/v1/auth_tokens_secondary.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.15)

imported and not used: "github.com/twilio/twilio-go/client"
)


// Create a new secondary Auth Token
func (c *ApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken, error) {
path := "/v1/AuthTokens/Secondary"
path := "/v1/AuthTokens/Secondary"

data := url.Values{}
headers := make(map[string]interface{})


data := url.Values{}
headers := make(map[string]interface{})

resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
}

defer resp.Body.Close()
resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
}

ps := &AccountsV1SecondaryAuthToken{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}
defer resp.Body.Close()

return ps, err
ps := &AccountsV1SecondaryAuthToken{}
if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
return nil, err
}

return ps, err
}

// Delete the secondary Auth Token from your account
func (c *ApiService) DeleteSecondaryAuthToken() error {
path := "/v1/AuthTokens/Secondary"
func (c *ApiService) DeleteSecondaryAuthToken() (error) {
path := "/v1/AuthTokens/Secondary"

data := url.Values{}
headers := make(map[string]interface{})



data := url.Values{}
headers := make(map[string]interface{})

resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
if err != nil {
return err
}
resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
if err != nil {
return err
}

defer resp.Body.Close()
defer resp.Body.Close()

return nil
return nil
}
Loading

0 comments on commit 01589c0

Please sign in to comment.