-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Librarian] Regenerated @ 1820de764052a95e2f0570d74a5de0ba04f74f2e
- Loading branch information
Showing
1,388 changed files
with
16,695 additions
and
16,038 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
twilio-go changelog | ||
==================== | ||
[2021-02-17] Version 0.1.1 | ||
-------------------------- | ||
|
||
|
||
[2021-02-11] Version 0.1.0 | ||
-------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* | ||
* This is the public Twilio REST API. | ||
* | ||
* API version: 1.8.0 | ||
* API version: 0.1.1 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
@@ -13,9 +13,10 @@ package openapi | |
import ( | ||
"encoding/json" | ||
"fmt" | ||
twilio "github.com/twilio/twilio-go/client" | ||
"net/url" | ||
"strings" | ||
|
||
twilio "github.com/twilio/twilio-go/client" | ||
) | ||
|
||
type DefaultApiService struct { | ||
|
@@ -24,15 +25,16 @@ type DefaultApiService struct { | |
} | ||
|
||
func NewDefaultApiService(client *twilio.Client) *DefaultApiService { | ||
return &DefaultApiService { | ||
client: client, | ||
return &DefaultApiService{ | ||
client: client, | ||
baseURL: fmt.Sprintf("https://accounts.twilio.com"), | ||
} | ||
} | ||
|
||
// CreateCredentialAwsParams Optional parameters for the method 'CreateCredentialAws' | ||
type CreateCredentialAwsParams struct { | ||
AccountSid *string `json:"AccountSid,omitempty"` | ||
Credentials *string `json:"Credentials,omitempty"` | ||
AccountSid *string `json:"AccountSid,omitempty"` | ||
Credentials *string `json:"Credentials,omitempty"` | ||
FriendlyName *string `json:"FriendlyName,omitempty"` | ||
} | ||
|
||
|
@@ -48,21 +50,19 @@ Create a new AWS Credential | |
func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParams) (*AccountsV1CredentialCredentialAws, error) { | ||
path := "/v1/Credentials/AWS" | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
if params != nil && params.AccountSid != nil { | ||
data.Set("AccountSid", *params.AccountSid) | ||
data.Set("AccountSid", *params.AccountSid) | ||
} | ||
if params != nil && params.Credentials != nil { | ||
data.Set("Credentials", *params.Credentials) | ||
data.Set("Credentials", *params.Credentials) | ||
} | ||
if params != nil && params.FriendlyName != nil { | ||
data.Set("FriendlyName", *params.FriendlyName) | ||
data.Set("FriendlyName", *params.FriendlyName) | ||
} | ||
|
||
|
||
resp, err := c.client.Post(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -77,11 +77,12 @@ func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParam | |
|
||
return ps, err | ||
} | ||
|
||
// CreateCredentialPublicKeyParams Optional parameters for the method 'CreateCredentialPublicKey' | ||
type CreateCredentialPublicKeyParams struct { | ||
AccountSid *string `json:"AccountSid,omitempty"` | ||
AccountSid *string `json:"AccountSid,omitempty"` | ||
FriendlyName *string `json:"FriendlyName,omitempty"` | ||
PublicKey *string `json:"PublicKey,omitempty"` | ||
PublicKey *string `json:"PublicKey,omitempty"` | ||
} | ||
|
||
/* | ||
|
@@ -96,21 +97,19 @@ Create a new Public Key Credential | |
func (c *DefaultApiService) CreateCredentialPublicKey(params *CreateCredentialPublicKeyParams) (*AccountsV1CredentialCredentialPublicKey, error) { | ||
path := "/v1/Credentials/PublicKeys" | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
if params != nil && params.AccountSid != nil { | ||
data.Set("AccountSid", *params.AccountSid) | ||
data.Set("AccountSid", *params.AccountSid) | ||
} | ||
if params != nil && params.FriendlyName != nil { | ||
data.Set("FriendlyName", *params.FriendlyName) | ||
data.Set("FriendlyName", *params.FriendlyName) | ||
} | ||
if params != nil && params.PublicKey != nil { | ||
data.Set("PublicKey", *params.PublicKey) | ||
data.Set("PublicKey", *params.PublicKey) | ||
} | ||
|
||
|
||
resp, err := c.client.Post(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -134,12 +133,9 @@ Create a new secondary Auth Token | |
func (c *DefaultApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken, error) { | ||
path := "/v1/AuthTokens/Secondary" | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
|
||
|
||
resp, err := c.client.Post(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -160,16 +156,13 @@ DeleteCredentialAws Method for DeleteCredentialAws | |
Delete a Credential from your account | ||
* @param Sid The Twilio-provided string that uniquely identifies the AWS resource to delete. | ||
*/ | ||
func (c *DefaultApiService) DeleteCredentialAws(Sid string) (error) { | ||
func (c *DefaultApiService) DeleteCredentialAws(Sid string) error { | ||
path := "/v1/Credentials/AWS/{Sid}" | ||
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
|
||
|
||
resp, err := c.client.Delete(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return err | ||
|
@@ -185,16 +178,13 @@ DeleteCredentialPublicKey Method for DeleteCredentialPublicKey | |
Delete a Credential from your account | ||
* @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete. | ||
*/ | ||
func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string) (error) { | ||
func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string) error { | ||
path := "/v1/Credentials/PublicKeys/{Sid}" | ||
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
|
||
|
||
resp, err := c.client.Delete(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return err | ||
|
@@ -209,15 +199,12 @@ func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string) (error) { | |
DeleteSecondaryAuthToken Method for DeleteSecondaryAuthToken | ||
Delete the secondary Auth Token from your account | ||
*/ | ||
func (c *DefaultApiService) DeleteSecondaryAuthToken() (error) { | ||
func (c *DefaultApiService) DeleteSecondaryAuthToken() error { | ||
path := "/v1/AuthTokens/Secondary" | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
|
||
|
||
resp, err := c.client.Delete(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return err | ||
|
@@ -238,12 +225,9 @@ func (c *DefaultApiService) FetchCredentialAws(Sid string) (*AccountsV1Credentia | |
path := "/v1/Credentials/AWS/{Sid}" | ||
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
|
||
|
||
resp, err := c.client.Get(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -269,12 +253,9 @@ func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1Cre | |
path := "/v1/Credentials/PublicKeys/{Sid}" | ||
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
|
||
|
||
resp, err := c.client.Get(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -289,6 +270,7 @@ func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1Cre | |
|
||
return ps, err | ||
} | ||
|
||
// ListCredentialAwsParams Optional parameters for the method 'ListCredentialAws' | ||
type ListCredentialAwsParams struct { | ||
PageSize *int32 `json:"PageSize,omitempty"` | ||
|
@@ -304,15 +286,13 @@ Retrieves a collection of AWS Credentials belonging to the account used to make | |
func (c *DefaultApiService) ListCredentialAws(params *ListCredentialAwsParams) (*ListCredentialAwsResponse, error) { | ||
path := "/v1/Credentials/AWS" | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
if params != nil && params.PageSize != nil { | ||
data.Set("PageSize", fmt.Sprint(*params.PageSize)) | ||
data.Set("PageSize", fmt.Sprint(*params.PageSize)) | ||
} | ||
|
||
|
||
resp, err := c.client.Get(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -327,6 +307,7 @@ func (c *DefaultApiService) ListCredentialAws(params *ListCredentialAwsParams) ( | |
|
||
return ps, err | ||
} | ||
|
||
// ListCredentialPublicKeyParams Optional parameters for the method 'ListCredentialPublicKey' | ||
type ListCredentialPublicKeyParams struct { | ||
PageSize *int32 `json:"PageSize,omitempty"` | ||
|
@@ -342,15 +323,13 @@ Retrieves a collection of Public Key Credentials belonging to the account used t | |
func (c *DefaultApiService) ListCredentialPublicKey(params *ListCredentialPublicKeyParams) (*ListCredentialPublicKeyResponse, error) { | ||
path := "/v1/Credentials/PublicKeys" | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
if params != nil && params.PageSize != nil { | ||
data.Set("PageSize", fmt.Sprint(*params.PageSize)) | ||
data.Set("PageSize", fmt.Sprint(*params.PageSize)) | ||
} | ||
|
||
|
||
resp, err := c.client.Get(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -374,12 +353,9 @@ Promote the secondary Auth Token to primary. After promoting the new token, all | |
func (c *DefaultApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion, error) { | ||
path := "/v1/AuthTokens/Promote" | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
|
||
|
||
resp, err := c.client.Post(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -394,6 +370,7 @@ func (c *DefaultApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenProm | |
|
||
return ps, err | ||
} | ||
|
||
// UpdateCredentialAwsParams Optional parameters for the method 'UpdateCredentialAws' | ||
type UpdateCredentialAwsParams struct { | ||
FriendlyName *string `json:"FriendlyName,omitempty"` | ||
|
@@ -411,15 +388,13 @@ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCreden | |
path := "/v1/Credentials/AWS/{Sid}" | ||
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
if params != nil && params.FriendlyName != nil { | ||
data.Set("FriendlyName", *params.FriendlyName) | ||
data.Set("FriendlyName", *params.FriendlyName) | ||
} | ||
|
||
|
||
resp, err := c.client.Post(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
@@ -434,6 +409,7 @@ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCreden | |
|
||
return ps, err | ||
} | ||
|
||
// UpdateCredentialPublicKeyParams Optional parameters for the method 'UpdateCredentialPublicKey' | ||
type UpdateCredentialPublicKeyParams struct { | ||
FriendlyName *string `json:"FriendlyName,omitempty"` | ||
|
@@ -451,15 +427,13 @@ func (c *DefaultApiService) UpdateCredentialPublicKey(Sid string, params *Update | |
path := "/v1/Credentials/PublicKeys/{Sid}" | ||
path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1) | ||
|
||
|
||
data := url.Values{} | ||
headers := 0 | ||
|
||
if params != nil && params.FriendlyName != nil { | ||
data.Set("FriendlyName", *params.FriendlyName) | ||
data.Set("FriendlyName", *params.FriendlyName) | ||
} | ||
|
||
|
||
resp, err := c.client.Post(c.baseURL+path, data, headers) | ||
if err != nil { | ||
return nil, err | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,22 @@ | |
* | ||
* This is the public Twilio REST API. | ||
* | ||
* API version: 1.8.0 | ||
* API version: 0.1.1 | ||
* Contact: [email protected] | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package openapi | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
// AccountsV1AuthTokenPromotion struct for AccountsV1AuthTokenPromotion | ||
type AccountsV1AuthTokenPromotion struct { | ||
AccountSid string `json:"AccountSid,omitempty"` | ||
AuthToken string `json:"AuthToken,omitempty"` | ||
AccountSid string `json:"AccountSid,omitempty"` | ||
AuthToken string `json:"AuthToken,omitempty"` | ||
DateCreated time.Time `json:"DateCreated,omitempty"` | ||
DateUpdated time.Time `json:"DateUpdated,omitempty"` | ||
Url string `json:"Url,omitempty"` | ||
Url string `json:"Url,omitempty"` | ||
} |
Oops, something went wrong.