orchestrator-swagger-go-client/docs/UserApi.md

3.2 KiB

\UserApi

All URIs are relative to /api/v1

Method HTTP request Description
UserTaskPost Post /user/task Start scraping all user sources
UserTaskUserIdGet Get /user/task/{user_id} Gets all tasks of a user

UserTaskPost

[][]TaskResponse UserTaskPost(ctx).Execute()

Start scraping all user sources

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

**[][]TaskResponse**

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

UserTaskUserIdGet

[]TaskResponse UserTaskUserIdGet(ctx, userId).Execute()

Gets all tasks of a user

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    userId := "userId_example" // string | User ID

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

**[]TaskResponse**

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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