Skip to content

Latest commit

 

History

History
292 lines (184 loc) · 7.17 KB

QuotaApi.md

File metadata and controls

292 lines (184 loc) · 7.17 KB

\QuotaApi

All URIs are relative to https://api.cloudsmith.io/v1

Method HTTP request Description
QuotaHistoryRead Get /quota/history/{owner}/ Quota history for a given namespace.
QuotaOssHistoryRead Get /quota/oss/history/{owner}/ Open-source Quota history for a given namespace.
QuotaOssRead Get /quota/oss/{owner}/ Open-source Quota usage for a given namespace.
QuotaRead Get /quota/{owner}/ Quota usage for a given namespace.

QuotaHistoryRead

QuotaHistory QuotaHistoryRead(ctx, owner).Execute()

Quota history for a given namespace.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)

func main() {
	owner := "owner_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

QuotaHistory

Authorization

apikey, basic

HTTP request headers

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

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

QuotaOssHistoryRead

QuotaHistory QuotaOssHistoryRead(ctx, owner).Execute()

Open-source Quota history for a given namespace.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)

func main() {
	owner := "owner_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

QuotaHistory

Authorization

apikey, basic

HTTP request headers

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

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

QuotaOssRead

Quota QuotaOssRead(ctx, owner).Execute()

Open-source Quota usage for a given namespace.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)

func main() {
	owner := "owner_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Quota

Authorization

apikey, basic

HTTP request headers

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

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

QuotaRead

Quota QuotaRead(ctx, owner).Execute()

Quota usage for a given namespace.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/cloudsmith-io/cloudsmith-api-go"
)

func main() {
	owner := "owner_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Quota

Authorization

apikey, basic

HTTP request headers

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

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