Skip to content

Latest commit

 

History

History
509 lines (326 loc) · 12.7 KB

BranchApi.md

File metadata and controls

509 lines (326 loc) · 12.7 KB

client\BranchApi

All URIs are relative to https://api.gridly.com

Method HTTP request Description
Create Post /v1/branches create
CreateDiffCheck Post /v1/branches/diffcheck createDiffCheck
Delete Delete /v1/branches/{branchId} delete
Get Get /v1/branches/{branchId} get
GetDiffCheck Get /v1/branches/diffcheck/{taskId} getDiffCheck
List Get /v1/branches list
Merge Post /v1/branches/{branchId}/merge merge

Create

Branch Create(ctx).CreateBranch(createBranch).GridId(gridId).BranchId(branchId).Execute()

create

Example

package main

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

func main() {
    createBranch := *gridly.NewCreateBranch("Name_example") // CreateBranch | 
    gridId := "gridId_example" // string | gridId (optional)
    branchId := "branchId_example" // string | branchId (optional)

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.BranchApi.Create(context.Background()).CreateBranch(createBranch).GridId(gridId).BranchId(branchId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BranchApi.Create``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Create`: Branch
    fmt.Fprintf(os.Stdout, "Response from `BranchApi.Create`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
createBranch CreateBranch
gridId string gridId
branchId string branchId

Return type

Branch

Authorization

ApiKey

HTTP request headers

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

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

CreateDiffCheck

Task CreateDiffCheck(ctx).SourceViewId(sourceViewId).DestinationViewId(destinationViewId).Execute()

createDiffCheck

Example

package main

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

func main() {
    sourceViewId := "sourceViewId_example" // string | sourceViewId
    destinationViewId := "destinationViewId_example" // string | destinationViewId

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.BranchApi.CreateDiffCheck(context.Background()).SourceViewId(sourceViewId).DestinationViewId(destinationViewId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BranchApi.CreateDiffCheck``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateDiffCheck`: Task
    fmt.Fprintf(os.Stdout, "Response from `BranchApi.CreateDiffCheck`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
sourceViewId string sourceViewId
destinationViewId string destinationViewId

Return type

Task

Authorization

ApiKey

HTTP request headers

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

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

Delete

Delete(ctx, branchId).Execute()

delete

Example

package main

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

func main() {
    branchId := "branchId_example" // string | branchId

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.BranchApi.Delete(context.Background(), branchId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BranchApi.Delete``: %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.
branchId string branchId

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

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

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

Get

Branch Get(ctx, branchId).Execute()

get

Example

package main

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

func main() {
    branchId := "branchId_example" // string | branchId

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Branch

Authorization

ApiKey

HTTP request headers

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

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

GetDiffCheck

[]BranchDiffRecord GetDiffCheck(ctx, taskId).MergeRecordOptions(mergeRecordOptions).Query(query).Page(page).Execute()

getDiffCheck

Example

package main

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

func main() {
    taskId := "taskId_example" // string | taskId
    mergeRecordOptions := []string{"MergeRecordOptions_example"} // []string | mergeRecordOptions (optional)
    query := "query_example" // string | query (optional) (default to "{}")
    page := "page_example" // string | page (optional) (default to "{}")

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.BranchApi.GetDiffCheck(context.Background(), taskId).MergeRecordOptions(mergeRecordOptions).Query(query).Page(page).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BranchApi.GetDiffCheck``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDiffCheck`: []BranchDiffRecord
    fmt.Fprintf(os.Stdout, "Response from `BranchApi.GetDiffCheck`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

mergeRecordOptions | []string | mergeRecordOptions | query | string | query | [default to "{}"] page | string | page | [default to "{}"]

Return type

[]BranchDiffRecord

Authorization

ApiKey

HTTP request headers

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

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

List

[]Branch List(ctx).GridId(gridId).Execute()

list

Example

package main

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

func main() {
    gridId := "gridId_example" // string | gridId

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

Path Parameters

Other Parameters

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

Name Type Description Notes
gridId string gridId

Return type

[]Branch

Authorization

ApiKey

HTTP request headers

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

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

Merge

Task Merge(ctx, branchId).DestinationBranchId(destinationBranchId).MergeBranchRequest(mergeBranchRequest).MergeRecordOptions(mergeRecordOptions).Execute()

merge

Example

package main

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

func main() {
    branchId := "branchId_example" // string | branchId
    destinationBranchId := "destinationBranchId_example" // string | destinationBranchId
    mergeBranchRequest := *gridly.NewMergeBranchRequest() // MergeBranchRequest | 
    mergeRecordOptions := []string{"MergeRecordOptions_example"} // []string | mergeRecordOptions (optional) (default to [])

    configuration := gridly.NewConfiguration()
    apiClient := gridly.NewAPIClient(configuration)
    resp, r, err := apiClient.BranchApi.Merge(context.Background(), branchId).DestinationBranchId(destinationBranchId).MergeBranchRequest(mergeBranchRequest).MergeRecordOptions(mergeRecordOptions).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `BranchApi.Merge``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Merge`: Task
    fmt.Fprintf(os.Stdout, "Response from `BranchApi.Merge`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

destinationBranchId | string | destinationBranchId | mergeBranchRequest | MergeBranchRequest | | mergeRecordOptions | []string | mergeRecordOptions | [default to []]

Return type

Task

Authorization

ApiKey

HTTP request headers

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

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