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 |
ContactVM ContactsCreate(ctx).CreateContactVM(createContactVM).Execute()
Creates new contact
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)
}
Other parameters are passed through a pointer to a apiContactsCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createContactVM | CreateContactVM |
- 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(ctx, id).Execute()
Removes contact by id
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)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiContactsDeleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ContactVM ContactsGet(ctx, id).Execute()
Returns contact group by id
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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiContactsGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ContactsVM ContactsGetByGroup(ctx, groupId).Skip(skip).Take(take).Execute()
Returns contacts by group id
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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
groupId | string |
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]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ContactsVM ContactsGetList(ctx, subscriptionId).Skip(skip).Take(take).SearchPattern(searchPattern).Execute()
Allows to search for contacts
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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
subscriptionId | string |
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 | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ContactVM ContactsUpdate(ctx, id).UpdateContactVM(updateContactVM).Execute()
Updates contact by id
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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string |
Other parameters are passed through a pointer to a apiContactsUpdateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateContactVM | UpdateContactVM | |
- 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]