Skip to content

Commit

Permalink
Deploying from phrase/openapi@3b8388ef
Browse files Browse the repository at this point in the history
  • Loading branch information
Phrase committed Apr 20, 2022
1 parent bbca07f commit f463251
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 97 deletions.
48 changes: 24 additions & 24 deletions cmd/api_blocked_keys.go → cmd/api_blacklisted_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ func init() {
initBlacklistedKeyUpdate()
initBlacklistedKeysList()

rootCmd.AddCommand(BlockedKeysApiCmd)
rootCmd.AddCommand(BlacklistedKeysApiCmd)
}

var BlockedKeysApiCmd = &cobra.Command{
Use: helpers.ToSnakeCase("BlockedKeys"),
Short: "BlockedKeys API",
var BlacklistedKeysApiCmd = &cobra.Command{
Use: helpers.ToSnakeCase("BlacklistedKeys"),
Short: "BlacklistedKeys API",
}

func initBlacklistedKeyCreate() {
Expand All @@ -35,8 +35,8 @@ func initBlacklistedKeyCreate() {
use = strings.Join(strings.Split("blacklisted_key/create", "/")[1:], "_")
var BlacklistedKeyCreate = &cobra.Command{
Use: use,
Short: "Create a blocked key",
Long: `Create a new rule for blocking keys.`,
Short: "Create a blacklisted key",
Long: `Create a new rule for blacklisting keys.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand Down Expand Up @@ -66,7 +66,7 @@ func initBlacklistedKeyCreate() {
if Config.Debug {
fmt.Printf("%+v\n", blacklistedKeyCreateParameters)
}
data, api_response, err := client.BlockedKeysApi.BlacklistedKeyCreate(auth, projectId, blacklistedKeyCreateParameters, &localVarOptionals)
data, api_response, err := client.BlacklistedKeysApi.BlacklistedKeyCreate(auth, projectId, blacklistedKeyCreateParameters, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -92,7 +92,7 @@ func initBlacklistedKeyCreate() {
},
}

BlockedKeysApiCmd.AddCommand(BlacklistedKeyCreate)
BlacklistedKeysApiCmd.AddCommand(BlacklistedKeyCreate)
AddFlag(BlacklistedKeyCreate, "string", helpers.ToSnakeCase("ProjectId"), "", "Project ID", true)
AddFlag(BlacklistedKeyCreate, "string", "data", "d", "payload in JSON format", true)
AddFlag(BlacklistedKeyCreate, "string", helpers.ToSnakeCase("XPhraseAppOTP"), "", "Two-Factor-Authentication token (optional)", false)
Expand All @@ -106,8 +106,8 @@ func initBlacklistedKeyDelete() {
use = strings.Join(strings.Split("blacklisted_key/delete", "/")[1:], "_")
var BlacklistedKeyDelete = &cobra.Command{
Use: use,
Short: "Delete a blocked key",
Long: `Delete an existing rule for blocking keys.`,
Short: "Delete a blacklisted key",
Long: `Delete an existing rule for blacklisting keys.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand All @@ -131,7 +131,7 @@ func initBlacklistedKeyDelete() {
projectId := params.GetString(helpers.ToSnakeCase("ProjectId"))
id := params.GetString(helpers.ToSnakeCase("Id"))

data, api_response, err := client.BlockedKeysApi.BlacklistedKeyDelete(auth, projectId, id, &localVarOptionals)
data, api_response, err := client.BlacklistedKeysApi.BlacklistedKeyDelete(auth, projectId, id, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -152,7 +152,7 @@ func initBlacklistedKeyDelete() {
},
}

BlockedKeysApiCmd.AddCommand(BlacklistedKeyDelete)
BlacklistedKeysApiCmd.AddCommand(BlacklistedKeyDelete)
AddFlag(BlacklistedKeyDelete, "string", helpers.ToSnakeCase("ProjectId"), "", "Project ID", true)
AddFlag(BlacklistedKeyDelete, "string", helpers.ToSnakeCase("Id"), "", "ID", true)
AddFlag(BlacklistedKeyDelete, "string", helpers.ToSnakeCase("XPhraseAppOTP"), "", "Two-Factor-Authentication token (optional)", false)
Expand All @@ -166,8 +166,8 @@ func initBlacklistedKeyShow() {
use = strings.Join(strings.Split("blacklisted_key/show", "/")[1:], "_")
var BlacklistedKeyShow = &cobra.Command{
Use: use,
Short: "Get a single blocked key",
Long: `Get details on a single rule for blocking keys for a given project.`,
Short: "Get a single blacklisted key",
Long: `Get details on a single rule for blacklisting keys for a given project.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand All @@ -191,7 +191,7 @@ func initBlacklistedKeyShow() {
projectId := params.GetString(helpers.ToSnakeCase("ProjectId"))
id := params.GetString(helpers.ToSnakeCase("Id"))

data, api_response, err := client.BlockedKeysApi.BlacklistedKeyShow(auth, projectId, id, &localVarOptionals)
data, api_response, err := client.BlacklistedKeysApi.BlacklistedKeyShow(auth, projectId, id, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -217,7 +217,7 @@ func initBlacklistedKeyShow() {
},
}

BlockedKeysApiCmd.AddCommand(BlacklistedKeyShow)
BlacklistedKeysApiCmd.AddCommand(BlacklistedKeyShow)
AddFlag(BlacklistedKeyShow, "string", helpers.ToSnakeCase("ProjectId"), "", "Project ID", true)
AddFlag(BlacklistedKeyShow, "string", helpers.ToSnakeCase("Id"), "", "ID", true)
AddFlag(BlacklistedKeyShow, "string", helpers.ToSnakeCase("XPhraseAppOTP"), "", "Two-Factor-Authentication token (optional)", false)
Expand All @@ -231,8 +231,8 @@ func initBlacklistedKeyUpdate() {
use = strings.Join(strings.Split("blacklisted_key/update", "/")[1:], "_")
var BlacklistedKeyUpdate = &cobra.Command{
Use: use,
Short: "Update a blocked key",
Long: `Update an existing rule for blocking keys.`,
Short: "Update a blacklisted key",
Long: `Update an existing rule for blacklisting keys.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand Down Expand Up @@ -263,7 +263,7 @@ func initBlacklistedKeyUpdate() {
if Config.Debug {
fmt.Printf("%+v\n", blacklistedKeyUpdateParameters)
}
data, api_response, err := client.BlockedKeysApi.BlacklistedKeyUpdate(auth, projectId, id, blacklistedKeyUpdateParameters, &localVarOptionals)
data, api_response, err := client.BlacklistedKeysApi.BlacklistedKeyUpdate(auth, projectId, id, blacklistedKeyUpdateParameters, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -289,7 +289,7 @@ func initBlacklistedKeyUpdate() {
},
}

BlockedKeysApiCmd.AddCommand(BlacklistedKeyUpdate)
BlacklistedKeysApiCmd.AddCommand(BlacklistedKeyUpdate)
AddFlag(BlacklistedKeyUpdate, "string", helpers.ToSnakeCase("ProjectId"), "", "Project ID", true)
AddFlag(BlacklistedKeyUpdate, "string", helpers.ToSnakeCase("Id"), "", "ID", true)
AddFlag(BlacklistedKeyUpdate, "string", "data", "d", "payload in JSON format", true)
Expand All @@ -304,8 +304,8 @@ func initBlacklistedKeysList() {
use = strings.Join(strings.Split("blacklisted_keys/list", "/")[1:], "_")
var BlacklistedKeysList = &cobra.Command{
Use: use,
Short: "List blocked keys",
Long: `List all rules for blocking keys for the given project.`,
Short: "List blacklisted keys",
Long: `List all rules for blacklisting keys for the given project.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand Down Expand Up @@ -337,7 +337,7 @@ func initBlacklistedKeysList() {

projectId := params.GetString(helpers.ToSnakeCase("ProjectId"))

data, api_response, err := client.BlockedKeysApi.BlacklistedKeysList(auth, projectId, &localVarOptionals)
data, api_response, err := client.BlacklistedKeysApi.BlacklistedKeysList(auth, projectId, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -363,7 +363,7 @@ func initBlacklistedKeysList() {
},
}

BlockedKeysApiCmd.AddCommand(BlacklistedKeysList)
BlacklistedKeysApiCmd.AddCommand(BlacklistedKeysList)
AddFlag(BlacklistedKeysList, "string", helpers.ToSnakeCase("ProjectId"), "", "Project ID", true)
AddFlag(BlacklistedKeysList, "string", helpers.ToSnakeCase("XPhraseAppOTP"), "", "Two-Factor-Authentication token (optional)", false)
AddFlag(BlacklistedKeysList, "int32", helpers.ToSnakeCase("Page"), "", "Page number", false)
Expand Down
48 changes: 24 additions & 24 deletions cmd/api_term_bases.go → cmd/api_glossaries.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ func init() {
initGlossaryShow()
initGlossaryUpdate()

rootCmd.AddCommand(TermBasesApiCmd)
rootCmd.AddCommand(GlossariesApiCmd)
}

var TermBasesApiCmd = &cobra.Command{
Use: helpers.ToSnakeCase("TermBases"),
Short: "TermBases API",
var GlossariesApiCmd = &cobra.Command{
Use: helpers.ToSnakeCase("Glossaries"),
Short: "Glossaries API",
}

func initGlossariesList() {
Expand All @@ -35,8 +35,8 @@ func initGlossariesList() {
use = strings.Join(strings.Split("glossaries/list", "/")[1:], "_")
var GlossariesList = &cobra.Command{
Use: use,
Short: "List term bases",
Long: `List all term bases (previously: glossaries) the current user has access to.`,
Short: "List glossaries",
Long: `List all glossaries the current user has access to.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand Down Expand Up @@ -65,7 +65,7 @@ func initGlossariesList() {

accountId := params.GetString(helpers.ToSnakeCase("AccountId"))

data, api_response, err := client.TermBasesApi.GlossariesList(auth, accountId, &localVarOptionals)
data, api_response, err := client.GlossariesApi.GlossariesList(auth, accountId, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -91,7 +91,7 @@ func initGlossariesList() {
},
}

TermBasesApiCmd.AddCommand(GlossariesList)
GlossariesApiCmd.AddCommand(GlossariesList)
AddFlag(GlossariesList, "string", helpers.ToSnakeCase("AccountId"), "", "Account ID", true)
AddFlag(GlossariesList, "string", helpers.ToSnakeCase("XPhraseAppOTP"), "", "Two-Factor-Authentication token (optional)", false)
AddFlag(GlossariesList, "int32", helpers.ToSnakeCase("Page"), "", "Page number", false)
Expand All @@ -106,8 +106,8 @@ func initGlossaryCreate() {
use = strings.Join(strings.Split("glossary/create", "/")[1:], "_")
var GlossaryCreate = &cobra.Command{
Use: use,
Short: "Create a term base",
Long: `Create a new term base (previously: glossary).`,
Short: "Create a glossary",
Long: `Create a new glossary.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand Down Expand Up @@ -137,7 +137,7 @@ func initGlossaryCreate() {
if Config.Debug {
fmt.Printf("%+v\n", glossaryCreateParameters)
}
data, api_response, err := client.TermBasesApi.GlossaryCreate(auth, accountId, glossaryCreateParameters, &localVarOptionals)
data, api_response, err := client.GlossariesApi.GlossaryCreate(auth, accountId, glossaryCreateParameters, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -163,7 +163,7 @@ func initGlossaryCreate() {
},
}

TermBasesApiCmd.AddCommand(GlossaryCreate)
GlossariesApiCmd.AddCommand(GlossaryCreate)
AddFlag(GlossaryCreate, "string", helpers.ToSnakeCase("AccountId"), "", "Account ID", true)
AddFlag(GlossaryCreate, "string", "data", "d", "payload in JSON format", true)
AddFlag(GlossaryCreate, "string", helpers.ToSnakeCase("XPhraseAppOTP"), "", "Two-Factor-Authentication token (optional)", false)
Expand All @@ -177,8 +177,8 @@ func initGlossaryDelete() {
use = strings.Join(strings.Split("glossary/delete", "/")[1:], "_")
var GlossaryDelete = &cobra.Command{
Use: use,
Short: "Delete a term base",
Long: `Delete an existing term base (previously: glossary).`,
Short: "Delete a glossary",
Long: `Delete an existing glossary.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand All @@ -202,7 +202,7 @@ func initGlossaryDelete() {
accountId := params.GetString(helpers.ToSnakeCase("AccountId"))
id := params.GetString(helpers.ToSnakeCase("Id"))

data, api_response, err := client.TermBasesApi.GlossaryDelete(auth, accountId, id, &localVarOptionals)
data, api_response, err := client.GlossariesApi.GlossaryDelete(auth, accountId, id, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -223,7 +223,7 @@ func initGlossaryDelete() {
},
}

TermBasesApiCmd.AddCommand(GlossaryDelete)
GlossariesApiCmd.AddCommand(GlossaryDelete)
AddFlag(GlossaryDelete, "string", helpers.ToSnakeCase("AccountId"), "", "Account ID", true)
AddFlag(GlossaryDelete, "string", helpers.ToSnakeCase("Id"), "", "ID", true)
AddFlag(GlossaryDelete, "string", helpers.ToSnakeCase("XPhraseAppOTP"), "", "Two-Factor-Authentication token (optional)", false)
Expand All @@ -237,8 +237,8 @@ func initGlossaryShow() {
use = strings.Join(strings.Split("glossary/show", "/")[1:], "_")
var GlossaryShow = &cobra.Command{
Use: use,
Short: "Get a single term base",
Long: `Get details on a single term base (previously: glossary).`,
Short: "Get a single glossary",
Long: `Get details on a single glossary.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand All @@ -262,7 +262,7 @@ func initGlossaryShow() {
accountId := params.GetString(helpers.ToSnakeCase("AccountId"))
id := params.GetString(helpers.ToSnakeCase("Id"))

data, api_response, err := client.TermBasesApi.GlossaryShow(auth, accountId, id, &localVarOptionals)
data, api_response, err := client.GlossariesApi.GlossaryShow(auth, accountId, id, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -288,7 +288,7 @@ func initGlossaryShow() {
},
}

TermBasesApiCmd.AddCommand(GlossaryShow)
GlossariesApiCmd.AddCommand(GlossaryShow)
AddFlag(GlossaryShow, "string", helpers.ToSnakeCase("AccountId"), "", "Account ID", true)
AddFlag(GlossaryShow, "string", helpers.ToSnakeCase("Id"), "", "ID", true)
AddFlag(GlossaryShow, "string", helpers.ToSnakeCase("XPhraseAppOTP"), "", "Two-Factor-Authentication token (optional)", false)
Expand All @@ -302,8 +302,8 @@ func initGlossaryUpdate() {
use = strings.Join(strings.Split("glossary/update", "/")[1:], "_")
var GlossaryUpdate = &cobra.Command{
Use: use,
Short: "Update a term base",
Long: `Update an existing term base (previously: glossary).`,
Short: "Update a glossary",
Long: `Update an existing glossary.`,
Run: func(cmd *cobra.Command, args []string) {
auth := Auth()

Expand Down Expand Up @@ -334,7 +334,7 @@ func initGlossaryUpdate() {
if Config.Debug {
fmt.Printf("%+v\n", glossaryUpdateParameters)
}
data, api_response, err := client.TermBasesApi.GlossaryUpdate(auth, accountId, id, glossaryUpdateParameters, &localVarOptionals)
data, api_response, err := client.GlossariesApi.GlossaryUpdate(auth, accountId, id, glossaryUpdateParameters, &localVarOptionals)

if err != nil {
switch castedError := err.(type) {
Expand All @@ -360,7 +360,7 @@ func initGlossaryUpdate() {
},
}

TermBasesApiCmd.AddCommand(GlossaryUpdate)
GlossariesApiCmd.AddCommand(GlossaryUpdate)
AddFlag(GlossaryUpdate, "string", helpers.ToSnakeCase("AccountId"), "", "Account ID", true)
AddFlag(GlossaryUpdate, "string", helpers.ToSnakeCase("Id"), "", "ID", true)
AddFlag(GlossaryUpdate, "string", "data", "d", "payload in JSON format", true)
Expand Down
Loading

0 comments on commit f463251

Please sign in to comment.