Skip to content

Latest commit

 

History

History
197 lines (148 loc) · 7.97 KB

README.md

File metadata and controls

197 lines (148 loc) · 7.97 KB

Parameters

(Parameters)

Overview

Global properties

Available Operations

ListParameters

Get the current value of all the global properties (a.k.a. global parameters)

Example Usage

package main

import(
	rudder "github.com/infra-rdc/rudder-go"
	"context"
	"log"
)

func main() {
    s := rudder.New(
        rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Parameters.ListParameters(ctx)
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.

Response

*operations.ListParametersResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

ParameterDetails

Get the current value of a given global property (a.k.a. global parameter)

Example Usage

package main

import(
	rudder "github.com/infra-rdc/rudder-go"
	"context"
	"log"
)

func main() {
    s := rudder.New(
        rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
    )
    var parameterID string = "rudder_file_edit_header"
    ctx := context.Background()
    res, err := s.Parameters.ParameterDetails(ctx, parameterID)
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description Example
ctx context.Context ✔️ The context to use for the request.
parameterID string ✔️ Id of the parameter to manage rudder_file_edit_header

Response

*operations.ParameterDetailsResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

UpdateParameter

Update the details of a global property

Example Usage

package main

import(
	rudder "github.com/infra-rdc/rudder-go"
	"context"
	"log"
)

func main() {
    s := rudder.New(
        rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
    )
    var parameterID string = "rudder_file_edit_header"
    ctx := context.Background()
    res, err := s.Parameters.UpdateParameter(ctx, parameterID)
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description Example
ctx context.Context ✔️ The context to use for the request.
parameterID string ✔️ Id of the parameter to manage rudder_file_edit_header

Response

*operations.UpdateParameterResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

DeleteParameter

Delete an existing global parameter

Example Usage

package main

import(
	rudder "github.com/infra-rdc/rudder-go"
	"context"
	"log"
)

func main() {
    s := rudder.New(
        rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
    )
    var parameterID string = "rudder_file_edit_header"
    ctx := context.Background()
    res, err := s.Parameters.DeleteParameter(ctx, parameterID)
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description Example
ctx context.Context ✔️ The context to use for the request.
parameterID string ✔️ Id of the parameter to manage rudder_file_edit_header

Response

*operations.DeleteParameterResponse, error

Error Object Status Code Content Type
sdkerrors.DeleteParameterResponseBody 500 application/json
sdkerrors.SDKError 4xx-5xx /