Skip to content

Latest commit

 

History

History
280 lines (174 loc) · 6.16 KB

File metadata and controls

280 lines (174 loc) · 6.16 KB

\AppsAPI

All URIs are relative to https://api.machines.dev/v1

Method HTTP request Description
AppsCreate Post /apps Create App
AppsDelete Delete /apps/{app_name} Destroy App
AppsList Get /apps List Apps
AppsShow Get /apps/{app_name} Get App

AppsCreate

AppsCreate(ctx).Request(request).Execute()

Create App

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/OutboundSpade/FlyMachines"
)

func main() {
	request := *openapiclient.NewCreateAppRequest() // CreateAppRequest | App body

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.AppsAPI.AppsCreate(context.Background()).Request(request).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AppsAPI.AppsCreate``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAppsCreateRequest struct via the builder pattern

Name Type Description Notes
request CreateAppRequest App body

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AppsDelete

AppsDelete(ctx, appName).Execute()

Destroy App

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/OutboundSpade/FlyMachines"
)

func main() {
	appName := "appName_example" // string | Fly App Name

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.AppsAPI.AppsDelete(context.Background(), appName).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AppsAPI.AppsDelete``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
appName string Fly App Name

Other Parameters

Other parameters are passed through a pointer to a apiAppsDeleteRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AppsList

ListAppsResponse AppsList(ctx).OrgSlug(orgSlug).Execute()

List Apps

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/OutboundSpade/FlyMachines"
)

func main() {
	orgSlug := "orgSlug_example" // string | The org slug, or 'personal', to filter apps

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AppsAPI.AppsList(context.Background()).OrgSlug(orgSlug).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AppsAPI.AppsList``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AppsList`: ListAppsResponse
	fmt.Fprintf(os.Stdout, "Response from `AppsAPI.AppsList`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAppsListRequest struct via the builder pattern

Name Type Description Notes
orgSlug string The org slug, or 'personal', to filter apps

Return type

ListAppsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AppsShow

App AppsShow(ctx, appName).Execute()

Get App

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/OutboundSpade/FlyMachines"
)

func main() {
	appName := "appName_example" // string | Fly App Name

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AppsAPI.AppsShow(context.Background(), appName).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AppsAPI.AppsShow``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AppsShow`: App
	fmt.Fprintf(os.Stdout, "Response from `AppsAPI.AppsShow`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
appName string Fly App Name

Other Parameters

Other parameters are passed through a pointer to a apiAppsShowRequest struct via the builder pattern

Name Type Description Notes

Return type

App

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]