Skip to content

Latest commit

 

History

History
428 lines (281 loc) · 11.3 KB

ContactsAPI.md

File metadata and controls

428 lines (281 loc) · 11.3 KB

\ContactsAPI

All URIs are relative to http://localhost

Method HTTP request Description
ContactsCreate Post /api/v1/Contacts/contact Creates new contact
ContactsDelete Delete /api/v1/Contacts/{id} Removes contact by id
ContactsGet Get /api/v1/Contacts/{id} Returns contact group by id
ContactsGetByGroup Get /api/v1/Contacts/group/{groupId}/contacts Returns contacts by group id
ContactsGetList Get /api/v1/Contacts/subscription/{subscriptionId}/contacts Allows to search for contacts
ContactsUpdate Put /api/v1/Contacts/{id} Updates contact by id

ContactsCreate

ContactVM ContactsCreate(ctx).CreateContactVM(createContactVM).Execute()

Creates new contact

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	createContactVM := *openapiclient.NewCreateContactVM() // CreateContactVM |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
createContactVM CreateContactVM

Return type

ContactVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

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

ContactsDelete

ContactsDelete(ctx, id).Execute()

Removes contact by id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	id := "id_example" // string | 

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

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey, JWT

HTTP request headers

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

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

ContactsGet

ContactVM ContactsGet(ctx, id).Execute()

Returns contact group by id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	id := "id_example" // string | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ContactVM

Authorization

ApiKey, JWT

HTTP request headers

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

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

ContactsGetByGroup

ContactsVM ContactsGetByGroup(ctx, groupId).Skip(skip).Take(take).Execute()

Returns contacts by group id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	groupId := "groupId_example" // string | 
	skip := int32(56) // int32 |  (optional) (default to 0)
	take := int32(56) // int32 |  (optional) (default to 10)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ContactsAPI.ContactsGetByGroup(context.Background(), groupId).Skip(skip).Take(take).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContactsAPI.ContactsGetByGroup``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ContactsGetByGroup`: ContactsVM
	fmt.Fprintf(os.Stdout, "Response from `ContactsAPI.ContactsGetByGroup`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

skip | int32 | | [default to 0] take | int32 | | [default to 10]

Return type

ContactsVM

Authorization

ApiKey, JWT

HTTP request headers

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

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

ContactsGetList

ContactsVM ContactsGetList(ctx, subscriptionId).Skip(skip).Take(take).SearchPattern(searchPattern).Execute()

Allows to search for contacts

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	subscriptionId := "subscriptionId_example" // string | 
	skip := int32(56) // int32 |  (optional) (default to 0)
	take := int32(56) // int32 |  (optional) (default to 10)
	searchPattern := "searchPattern_example" // string |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ContactsAPI.ContactsGetList(context.Background(), subscriptionId).Skip(skip).Take(take).SearchPattern(searchPattern).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContactsAPI.ContactsGetList``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ContactsGetList`: ContactsVM
	fmt.Fprintf(os.Stdout, "Response from `ContactsAPI.ContactsGetList`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

skip | int32 | | [default to 0] take | int32 | | [default to 10] searchPattern | string | |

Return type

ContactsVM

Authorization

ApiKey, JWT

HTTP request headers

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

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

ContactsUpdate

ContactVM ContactsUpdate(ctx, id).UpdateContactVM(updateContactVM).Execute()

Updates contact by id

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
	id := "id_example" // string | 
	updateContactVM := *openapiclient.NewUpdateContactVM() // UpdateContactVM |  (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ContactsAPI.ContactsUpdate(context.Background(), id).UpdateContactVM(updateContactVM).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContactsAPI.ContactsUpdate``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ContactsUpdate`: ContactVM
	fmt.Fprintf(os.Stdout, "Response from `ContactsAPI.ContactsUpdate`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

updateContactVM | UpdateContactVM | |

Return type

ContactVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: application/json

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