wrike

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2021 License: MIT Imports: 12 Imported by: 0

README

wrike.go Go PkgGoDev Go Report Card

Go implementation of Wrike API client

Basic usage

package main

import (
    "fmt"

    "github.com/wingman131/wrike.go"
)

func main() {
    conf := wrike.NewConfig("wrike-access-token", "") // Default host name is "app-eu.wrike.com"
    // To set a different host name:
    // conf := wrike.NewConfig("wrike-access-token", "www.wrike.com")
    api := wrike.NewAPI(conf)

    user, err := api.QueryUser("KUAAAA3E")
    if err != nil {
      panic(err)
    }

    fmt.Println(user.Kind)                      // => "users"
    fmt.Println(user.Data[0].ID)                // => "KUAAAA3E"
    fmt.Println(user.Data[0].Profiles[0].Email) // => "kqri7kgjlb@y21z0uysjx.com"
}

Acknowledgements

Forked from github.com/AkihikoITOH/wrike.go in order to add in some introspection for debugging purposes.

Documentation

Overview

Example (CopyFolder)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	f := false
	t := true
	entryLimit := 50
	params := parameters.CopyFolder{
		Parent:             "IEAAAAAQI4AB5BGX",
		CopyParents:        &f,
		EntryLimit:         &entryLimit,
		CopyDescriptions:   &t,
		CopyCustomFields:   &t,
		CopyCustomStatuses: &t,
		CopyResponsibles:   &t,
		RemoveResponsibles: parameters.ContactIDSet{"KUAAAAAQ"},
		AddResponsibles:    parameters.ContactIDSet{"KUAAAAHK"},
		RescheduleMode:     "Start",
		RescheduleDate:     "2019-02-18",
		Title:              "Test folder copy",
	}
	api.CopyFolder("IEAAAAAQI4AB5BGU", params)
}
Output:

Example (CreateCustomField)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.CreateCustomField{
		Title:   "Test custom field",
		Type:    types.TextType,
		Shareds: parameters.ContactIDSet{"KUAAAAAQ"},
	}
	api.CreateCustomField(params)
}
Output:

Example (CreateFolder)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.CreateFolder{
		Metadata:     &parameters.MetadataSet{parameters.Metadata{Key: "testMetaKey", Value: "testMetaValue"}},
		CustomFields: parameters.CustomFieldSet{parameters.CustomField{ID: "IEAAAAAQJUAAAAAX", Value: "testValue"}},
		Description:  "Test description",
		Project:      parameters.Project{OwnerIDs: parameters.ContactIDSet{"KUAAAAAQ"}, Status: types.Green, StartDate: "2019-02-18", EndDate: "2019-02-25"},
		Title:        "Test folder",
		Shareds:      parameters.ContactIDSet{"KUAAAAAQ"},
	}
	api.CreateFolder("IEAAAAAQI4AB5BGU", params)
}
Output:

Example (CreateGroup)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	parent := types.ContactID("KX77777I")
	params := parameters.CreateGroup{
		Title:    "Test",
		Members:  parameters.ContactIDSet{"KUAAAAHK", "KUAAAAAQ"},
		Parent:   &parent,
		Avatar:   &parameters.Avatar{Letters: "TG", Color: "#e7fac6"},
		Metadata: &parameters.MetadataSet{parameters.Metadata{Key: "testMetaKey", Value: "testMetaValue"}},
	}
	api.CreateGroup(params)
}
Output:

Example (CreateTask)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	parameters "github.com/wingman131/wrike.go/parameters"

	types "github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.CreateTask{}
	api.CreateTask(types.FolderID("IEAAAAAQI4AB5BGU"), params)
}
Output:

Example (CreateWorkflow)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	parameters "github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.CreateWorkflow{Name: "Test workflow"}
	api.CreateWorkflow(params)
}
Output:

Example (DeleteFolder)
package main

import (
	wrike "github.com/wingman131/wrike.go"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	api.DeleteFolder("IEAAAAAQI4AB5BGU")
}
Output:

Example (DeleteGroup)
package main

import (
	wrike "github.com/wingman131/wrike.go"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	api.DeleteGroup("KX77777H")
}
Output:

Example (DeleteTask)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	api.DeleteTask(types.TaskID("IEAAAAAQKQAB5BG5"))
}
Output:

Example (GetFolderSubtree)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.GetFolderSubtree{}
	api.GetFolderSubtree("IEAAAAAQI4AB5BGU", &params)
}
Output:

Example (GetFolderTree)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.GetFolderTree{}
	api.GetFolderTree(&params)
}
Output:

Example (GetFolders)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.GetFolders{Fields: &parameters.FieldSet{"childIds", "briefDescription", "color"}}
	api.GetFolders([]types.FolderID{"IEAAAAAQI4AB5BGU", "IEAAAAAQI4AB5BGV"}, &params)
}
Output:

Example (ModifyAccount)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.ModifyAccount{
		Metadata: &parameters.MetadataSet{
			parameters.Metadata{Key: "testMetaKey", Value: "testMetaValue"},
		},
	}
	api.ModifyAccount(&params)
}
Output:

Example (ModifyContact)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.ModifyContact{
		Metadata: &parameters.MetadataSet{
			parameters.Metadata{Key: "testMetaKey", Value: "testMetaValue"},
		},
	}
	api.ModifyContact("KUAAAAAQ", &params)
}
Output:

Example (ModifyCustomField)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	title := "New test custom field"
	typ := types.NumericType
	params := parameters.ModifyCustomField{
		AddShareds:    parameters.ContactIDSet{"KUAAAA3E"},
		RemoveShareds: parameters.ContactIDSet{"KUAAAA3F"},
		Title:         &title,
		Type:          &typ,
	}
	api.ModifyCustomField("IEAAAAX3JUAAAAHL", &params)
}
Output:

Example (ModifyFolder)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.ModifyFolder{}
	api.ModifyFolder("KUAAAAHP", params)
}
Output:

Example (ModifyFolders)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.ModifyFolders{}
	api.ModifyFolders([]types.FolderID{"IEAAAAAQI4AB5BGU", "IEAAAAAQI4AB5BGV"}, params)
}
Output:

Example (ModifyGroup)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	title := "New test group"
	parent := "KX77777I"
	params := parameters.ModifyGroup{
		Title:         &title,
		AddMembers:    parameters.ContactIDSet{"KUAAAAAQ"},
		RemoveMembers: parameters.ContactIDSet{"KUAAAAHK"},
		Parent:        &parent,
		Avatar:        &parameters.Avatar{Letters: "NG", Color: "#c5cbd9"},
		Metadata:      &parameters.MetadataSet{parameters.Metadata{Key: "testMetaKey", Value: "testMetaValue"}},
	}
	api.ModifyGroup("KX77777H", &params)
}
Output:

Example (ModifyTask)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	title := "New title"
	desc := "New description"
	params := parameters.ModifyTask{
		RemoveSuperTasks: parameters.TaskIDSet{"IEAAAAAQKQAB5BG3"},
		PriorityAfter:    types.TaskID("IEAAAAAQKQAB5BG3"),
		Importance:       types.LowImportance,
		CustomFields:     parameters.CustomFieldSet{parameters.CustomField{ID: "IEAAAAAQJUAAAAAX"}, parameters.CustomField{ID: "IEAAAAAQJUAAAAAY", Value: "testValue"}},
		Description:      &desc,
		AddResponsibles:  parameters.ContactIDSet{"KUAAAAAQ"},
		Dates:            &parameters.TaskDates{Start: "2019-02-18", Due: "2019-02-21"},
		AddFollowers:     parameters.ContactIDSet{"KUAAAAAQ"},
		AddParents:       parameters.FolderIDSet{"IEAAAAAQI4AB5BGV"},
		Title:            &title,
		Status:           parameters.TaskStatusSet{types.DeferredTaskStatus},
	}
	api.ModifyTask(types.TaskID("IEAAAAAQKQAB5BG5"), params)
}
Output:

Example (ModifyTasks)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.ModifyTasks{
		CustomFields: parameters.CustomFieldSet{
			parameters.CustomField{ID: "IEAAAAAQJUAAAAAX", Value: "testValue"},
			parameters.CustomField{ID: "IEAAAAAQJUAAAAAY", Value: "testValue"},
		},
	}
	api.ModifyTasks([]types.TaskID{"IEAAAAAQKQAB5BG5", "IEAAAAAQKQAB5BG3"}, params)
}
Output:

Example (ModifyUser)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	accountID := "IEAAAAAQ"
	role := "Collaborator"
	external := true
	params := parameters.ModifyUser{
		Profile: &parameters.Profile{
			AccountID: &accountID,
			Role:      &role,
			External:  &external,
		},
	}
	api.ModifyUser("KUAAAAHP", &params)
}
Output:

Example (ModifyWorkflow)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	statusName := "In design"
	color := "Green"
	status := "Active"
	customStatus := parameters.CustomStatus{
		Name:  &statusName,
		Color: &color,
		Group: &status,
	}
	name := "New workflow"
	hidden := false
	params := parameters.ModifyWorkflow{
		Name:         &name,
		Hidden:       &hidden,
		CustomStatus: &customStatus,
	}
	api.ModifyWorkflow("IEAAAAAQK4AAAAFU", params)
}
Output:

Example (QueryAccounts)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.QueryAccounts{
		Fields: &parameters.FieldSet{types.CustomFieldsField, types.SubscriptionField, types.MetadataField},
	}
	api.QueryAccounts(&params)
}
Output:

Example (QueryContacts)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := &parameters.QueryContacts{
		Metadata: &parameters.Metadata{Key: "testMetaKey", Value: "testMetaValue"},
		Fields:   &parameters.FieldSet{"metadata"},
	}
	api.QueryContacts(params)
}
Output:

Example (QueryContactsByIDs)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := &parameters.QueryContacts{
		Metadata: &parameters.Metadata{Key: "testMetaKey", Value: "testMetaValue"},
		Fields:   &parameters.FieldSet{"metadata"},
	}
	api.QueryContactsByIDs(parameters.ContactIDSet{"KUAAAAHK", "KUAAAAAQ"}, params)
}
Output:

Example (QueryCustomFields)
package main

import (
	wrike "github.com/wingman131/wrike.go"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	api.QueryCustomFields()
}
Output:

Example (QueryCustomFieldsByIDs)
package main

import (
	wrike "github.com/wingman131/wrike.go"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	ids := []string{"IEAAAAAQJUAAAAAZ", "IEAAAAAQJUAAAAA2"}
	api.QueryCustomFieldsByIDs(ids)
}
Output:

Example (QueryGroup)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.QueryGroup{Fields: &parameters.FieldSet{"metadata"}}
	api.QueryGroup("KX77777H", &params)
}
Output:

Example (QueryGroups)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.QueryGroups{
		Fields:   &parameters.FieldSet{"metadata"},
		Metadata: &parameters.Metadata{Key: "Test Key", Value: "Test Value"},
	}
	api.QueryGroups(&params)
}
Output:

Example (QueryTasks)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.QueryTasks{}
	api.QueryTasks(params)
}
Output:

Example (QueryTasksByIDs)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.QueryTasksByIDs{}
	api.QueryTasksByIDs([]types.TaskID{"IEAAAAAQKQAB5BG3", "IEAAAAAQKQAB5BG5"}, params)
}
Output:

Example (QueryTasksInFolder)
package main

import (
	wrike "github.com/wingman131/wrike.go"
	"github.com/wingman131/wrike.go/parameters"
	"github.com/wingman131/wrike.go/types"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	params := parameters.QueryTasks{}
	api.QueryTasksInFolder(types.FolderID("IEAAAAAQI4AB5BGU"), params)
}
Output:

Example (QueryUser)
package main

import (
	wrike "github.com/wingman131/wrike.go"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	api.QueryUser("KUAAAAHP")
}
Output:

Example (QueryWorkflows)
package main

import (
	wrike "github.com/wingman131/wrike.go"
)

func main() {
	conf := wrike.NewConfig("wrike-access-token", "")
	api := wrike.NewAPI(conf)
	api.QueryWorkflows()
}
Output:

Index

Examples

Constants

View Source
const (
	// APIRootPath is the API root path.
	APIRootPath = "api"
	// APIVersion is the API version number.
	APIVersion = "v4"
	// DefaultTimeout is the duration for which it waits for the API to respond.
	DefaultTimeout = 10 * time.Second
)
View Source
const DefaultAPIHost = "app-eu.wrike.com"

DefaultAPIHost is the default API host name.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Config     *Config
	HTTPClient httpcmw.Doer
}

API object contains the API configuration and has methods to communicate with the API.

func NewAPI

func NewAPI(config *Config) *API

NewAPI creates and returns a new API object based on the given Config.

func (*API) CopyFolder

func (api *API) CopyFolder(id types.FolderID, params parameters.CopyFolder) (*types.Folders, error)

CopyFolder copies a folder. For details refer to https://developers.wrike.com/documentation/api/methods/copy-folder

func (*API) CreateCustomField

func (api *API) CreateCustomField(params parameters.CreateCustomField) (*types.CustomFields, error)

CreateCustomField creates a new customField with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/create-customFields

func (*API) CreateFolder

func (api *API) CreateFolder(id types.FolderID, params parameters.CreateFolder) (*types.Folders, error)

CreateFolder creates a new folder with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/create-folder

func (*API) CreateGroup

func (api *API) CreateGroup(params parameters.CreateGroup) (*types.Groups, error)

CreateGroup creates a new group with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/create-groups

func (*API) CreateTask

func (api *API) CreateTask(folderID types.FolderID, params parameters.CreateTask) (*types.Tasks, error)

CreateTask creates a new task with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/create-task

func (*API) CreateWorkflow

func (api *API) CreateWorkflow(params parameters.CreateWorkflow) (*types.Workflows, error)

CreateWorkflow creates a new workflow with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/create-workflows

func (*API) DeleteFolder

func (api *API) DeleteFolder(id types.FolderID) (*types.Folders, error)

DeleteFolder deletes an existing folder by given ID. For details refer to https://developers.wrike.com/documentation/api/methods/delete-folder

func (*API) DeleteGroup

func (api *API) DeleteGroup(id string) (*types.Groups, error)

DeleteGroup deletes an existing group by given ID. For details refer to https://developers.wrike.com/documentation/api/methods/delete-groups

func (*API) DeleteTask

func (api *API) DeleteTask(id types.TaskID) (*types.Tasks, error)

DeleteTask deletes an existing task by given ID. For details refer to https://developers.wrike.com/documentation/api/methods/delete-tasks

func (*API) GetFolderSubtree

func (api *API) GetFolderSubtree(id types.FolderID, params *parameters.GetFolderSubtree) (*types.FolderTree, error)

GetFolderSubtree fetches a list of tree entries for subtree of the folder. For details refer to https://developers.wrike.com/documentation/api/methods/get-folder-tree

func (*API) GetFolderTree

func (api *API) GetFolderTree(params *parameters.GetFolderTree) (*types.FolderTree, error)

GetFolderTree fetches a list of entries required to build a folder tree for the current account. For details refer to https://developers.wrike.com/documentation/api/methods/get-folder-tree

func (*API) GetFolders

func (api *API) GetFolders(ids []types.FolderID, params *parameters.GetFolders) (*types.Folders, error)

GetFolders fetches complete information about specified folders. For details refer to https://developers.wrike.com/documentation/api/methods/get-folder

func (*API) ModifyAccount

func (api *API) ModifyAccount(params *parameters.ModifyAccount) (*types.Accounts, error)

ModifyAccount modifies the current account with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-account

func (*API) ModifyContact

func (api *API) ModifyContact(id string, params *parameters.ModifyContact) (*types.Contacts, error)

ModifyContact modifies a contact with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-contact

func (*API) ModifyCustomField

func (api *API) ModifyCustomField(id string, params *parameters.ModifyCustomField) (*types.CustomFields, error)

ModifyCustomField modifies a custom field with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-custom-field

func (*API) ModifyFolder

func (api *API) ModifyFolder(id types.FolderID, params parameters.ModifyFolder) (*types.Folders, error)

ModifyFolder modifiies a folder with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-folder

func (*API) ModifyFolders

func (api *API) ModifyFolders(ids []types.FolderID, params parameters.ModifyFolders) (*types.Folders, error)

ModifyFolders modifiies folders with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-folder

func (*API) ModifyGroup

func (api *API) ModifyGroup(id string, params *parameters.ModifyGroup) (*types.Groups, error)

ModifyGroup modifiies a group with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-groups

func (*API) ModifyTask

func (api *API) ModifyTask(id types.TaskID, params parameters.ModifyTask) (*types.Tasks, error)

ModifyTask modifies a task with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-tasks

func (*API) ModifyTasks

func (api *API) ModifyTasks(ids []types.TaskID, params parameters.ModifyTasks) (*types.Tasks, error)

ModifyTasks modifies multiple tasks with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-tasks

func (*API) ModifyUser

func (api *API) ModifyUser(id string, params *parameters.ModifyUser) (*types.Contacts, error)

ModifyUser modifiies a user with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-user

func (*API) ModifyWorkflow

func (api *API) ModifyWorkflow(id string, params parameters.ModifyWorkflow) (*types.Workflows, error)

ModifyWorkflow modifiies a workflow with given parameters. For details refer to https://developers.wrike.com/documentation/api/methods/modify-workflow

func (*API) QueryAccounts

func (api *API) QueryAccounts(params *parameters.QueryAccounts) (*types.Accounts, error)

QueryAccounts fetches a Accounts by id. For details refer to https://developers.wrike.com/documentation/api/methods/query-accounts

func (*API) QueryContacts

func (api *API) QueryContacts(params *parameters.QueryContacts) (*types.Contacts, error)

QueryContacts fetches a list of contacts. For details refer to https://developers.wrike.com/documentation/api/methods/query-contacts

func (*API) QueryContactsByIDs

func (api *API) QueryContactsByIDs(ids parameters.ContactIDSet, params *parameters.QueryContacts) (*types.Contacts, error)

QueryContactsByIDs fetches contacts by IDs. For details refer to https://developers.wrike.com/documentation/api/methods/query-contacts

func (*API) QueryCustomFields

func (api *API) QueryCustomFields() (*types.CustomFields, error)

QueryCustomFields fetches all custom fields in the account. For details refer to https://developers.wrike.com/documentation/api/methods/query-custom-fields

func (*API) QueryCustomFieldsByIDs

func (api *API) QueryCustomFieldsByIDs(ids []string) (*types.CustomFields, error)

QueryCustomFieldsByIDs fetches all custom fields by the given IDs. For details refer to https://developers.wrike.com/documentation/api/methods/query-custom-fields

func (*API) QueryGroup

func (api *API) QueryGroup(id string, params *parameters.QueryGroup) (*types.Groups, error)

QueryGroup fetches a group by id. For details refer to https://developers.wrike.com/documentation/api/methods/query-groups

func (*API) QueryGroups

func (api *API) QueryGroups(params *parameters.QueryGroups) (*types.Groups, error)

QueryGroups fetches a list of groups. For details refer to https://developers.wrike.com/documentation/api/methods/query-groups

func (*API) QueryTasks

func (api *API) QueryTasks(params parameters.QueryTasks) (*types.Tasks, error)

QueryTasks fetches a list of tasks. For details refer to https://developers.wrike.com/documentation/api/methods/query-tasks

func (*API) QueryTasksByIDs

func (api *API) QueryTasksByIDs(ids []types.TaskID, params parameters.QueryTasksByIDs) (*types.Tasks, error)

QueryTasksByIDs fetches a list of tasks. For details refer to https://developers.wrike.com/documentation/api/methods/query-tasks

func (*API) QueryTasksInFolder

func (api *API) QueryTasksInFolder(folderID types.FolderID, params parameters.QueryTasks) (*types.Tasks, error)

QueryTasksInFolder fetches a list of tasks. For details refer to https://developers.wrike.com/documentation/api/methods/query-tasks

func (*API) QueryUser

func (api *API) QueryUser(id string) (*types.Contacts, error)

QueryUser fetches a User by id. For details refer to https://developers.wrike.com/documentation/api/methods/query-user

func (*API) QueryWorkflows

func (api *API) QueryWorkflows() (*types.Workflows, error)

QueryWorkflows fetches a Workflows For details refer to https://developers.wrike.com/documentation/api/methods/query-workflows

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config contains configuration parameters of the Wrike API.

func NewConfig

func NewConfig(apiAccessToken, apiHost string) *Config

NewConfig creates and returns a new Config object based on the given access token and api host.

func (*Config) APIAccessToken

func (c *Config) APIAccessToken() string

APIAccessToken returns the access token.

func (*Config) APIHost

func (c *Config) APIHost() string

APIHost returns the api host.

Directories

Path Synopsis
Package parameters contains types that represent sets of parameters that are passed to the API.
Package parameters contains types that represent sets of parameters that are passed to the API.
Package types contains various types that are used to parse responses from the API.
Package types contains various types that are used to parse responses from the API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL