Skip to content

Files

Latest commit

 

History

History
142 lines (88 loc) · 3.99 KB

ContactPropertiesAPI.md

File metadata and controls

142 lines (88 loc) · 3.99 KB

\ContactPropertiesAPI

All URIs are relative to https://app.loops.so/api/v1

Method HTTP request Description
ContactsPropertiesGet Get /contacts/properties Get a list of contact properties
ContactsPropertiesPost Post /contacts/properties Create a contact property

ContactsPropertiesGet

[]ContactProperty ContactsPropertiesGet(ctx).List(list).Execute()

Get a list of contact properties

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/behnh/loops-api-go"
)

func main() {
	list := "list_example" // string | \\\"all\\\" (default) or \\\"custom\\\" (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
list string \"all\" (default) or \"custom\"

Return type

[]ContactProperty

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]

ContactsPropertiesPost

ContactPropertySuccessResponse ContactsPropertiesPost(ctx).ContactPropertyCreateRequest(contactPropertyCreateRequest).Execute()

Create a contact property

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/behnh/loops-api-go"
)

func main() {
	contactPropertyCreateRequest := *openapiclient.NewContactPropertyCreateRequest("Name_example", "Type_example") // ContactPropertyCreateRequest | The name value must be in camelCase, like `planName`.

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

Path Parameters

Other Parameters

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

Name Type Description Notes
contactPropertyCreateRequest ContactPropertyCreateRequest The name value must be in camelCase, like `planName`.

Return type

ContactPropertySuccessResponse

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]