This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
orchestrator-swagger-go-client/docs/PlugAPI.md
2024-07-15 10:24:50 +02:00

5.8 KiB

\PlugAPI

All URIs are relative to /api/v1

Method HTTP request Description
PlugPlugTypePut Put /plug/{plug_type} Initiates a scraping operation for a user with a specific plug type
PlugPlugTypeTaskIdDelete Delete /plug/{plug_type}/{task_id} Stops a scraping operation for a user with a specific plug type
PlugPlugTypeTaskIdGet Get /plug/{plug_type}/{task_id} Retrieves the status of a specific task type

PlugPlugTypePut

PlugPlugTypePut(ctx, plugType).Request(request).Execute()

Initiates a scraping operation for a user with a specific plug type

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "git.dragse.it/anthrove/orchestrator-swagger-go-client"
)

func main() {
	plugType := "plugType_example" // string | supported plug type
	request := *openapiclient.NewModelsOrchestratorTask("AnthroveUserId_example", false, *openapiclient.NewModelsPlugTask("UserId_example")) // ModelsOrchestratorTask | aa

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.PlugAPI.PlugPlugTypePut(context.Background(), plugType).Request(request).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PlugAPI.PlugPlugTypePut``: %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.
plugType string supported plug type

Other Parameters

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

Name Type Description Notes

request | ModelsOrchestratorTask | aa |

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

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

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

PlugPlugTypeTaskIdDelete

PlugPlugTypeTaskIdDelete(ctx, plugType, taskId).Execute()

Stops a scraping operation for a user with a specific plug type

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "git.dragse.it/anthrove/orchestrator-swagger-go-client"
)

func main() {
	plugType := "plugType_example" // string | supported plug type
	taskId := "taskId_example" // string | id of task

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.PlugAPI.PlugPlugTypeTaskIdDelete(context.Background(), plugType, taskId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PlugAPI.PlugPlugTypeTaskIdDelete``: %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.
plugType string supported plug type
taskId string id of task

Other Parameters

Other parameters are passed through a pointer to a apiPlugPlugTypeTaskIdDeleteRequest 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]

PlugPlugTypeTaskIdGet

PlugPlugTypeTaskIdGet(ctx, plugType, taskId).Execute()

Retrieves the status of a specific task type

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "git.dragse.it/anthrove/orchestrator-swagger-go-client"
)

func main() {
	plugType := "plugType_example" // string | supported plug type
	taskId := "taskId_example" // string | id of task

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.PlugAPI.PlugPlugTypeTaskIdGet(context.Background(), plugType, taskId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `PlugAPI.PlugPlugTypeTaskIdGet``: %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.
plugType string supported plug type
taskId string id of task

Other Parameters

Other parameters are passed through a pointer to a apiPlugPlugTypeTaskIdGetRequest 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]