pipedrivesdk

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 6 Imported by: 0

README

pipedrive-sdk for Golang

Use this library to import new deals and contacts to Pipedrive.

Search / lookup:

  • Search for person
  • Search for organization

Creation / data-entry:

  • Create a new person
  • Create a new organization
  • Create a new deal
  • Add a note to a deal

View the generated Go docs on pkg.go.dev

Read an example: example/example.go

Browse the code:

License: MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDealNoteResponse

type CreateDealNoteResponse struct {
	Success bool `json:"success"`
	Data    struct {
		ID int `json:"id"`
	}
}

type CreateDealResponse

type CreateDealResponse struct {
	Success bool `json:"success"`
	Data    struct {
		ID      int    `json:"id"`
		Content string `json:"content"`
	}
}

type CreateOrgResponse

type CreateOrgResponse struct {
	Success bool `json:"success"`
	Data    struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"data"`
}

type CreatePersonResponse

type CreatePersonResponse struct {
	Success bool `json:"success"`
	Data    struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"data"`
}

type DealResponse

type DealResponse struct {
	Success bool `json:"success"`

	Data struct {
		ID    int    `json:"id"`
		Title string `json:"title"`
		Value int    `json:"value"`
	}
}

type PipeDriveClient

type PipeDriveClient struct {
	Client       *http.Client
	APIKey       string
	Organization string
}

func NewPipeDriveClient

func NewPipeDriveClient(client *http.Client, apiKey, organization string) *PipeDriveClient

func (*PipeDriveClient) CreateDeal

func (p *PipeDriveClient) CreateDeal(title string, orgID, personID int) (DealResponse, error)

func (*PipeDriveClient) CreateDealNote

func (p *PipeDriveClient) CreateDealNote(content string, dealID int) (CreateDealNoteResponse, error)

func (*PipeDriveClient) CreateOrg

func (p *PipeDriveClient) CreateOrg(name string) (CreateOrgResponse, error)

func (*PipeDriveClient) CreatePerson

func (p *PipeDriveClient) CreatePerson(name, email string, orgID int) (CreatePersonResponse, error)

func (*PipeDriveClient) SearchOrg

func (p *PipeDriveClient) SearchOrg(term string) (SearchResponse, error)

func (*PipeDriveClient) SearchPersonByEmail

func (p *PipeDriveClient) SearchPersonByEmail(term string) (SearchPersonResponse, error)

type SearchPersonResponse

type SearchPersonResponse struct {
	Success bool `json:"success"`
	Data    struct {
		Items []struct {
			ResultScore float64 `json:"result_score"`
			Item        struct {
				ID     int      `json:"id"`
				Name   string   `json:"name"`
				Emails []string `json:"emails"`
			} `json:"item"`
		} `json:"items"`
	} `json:"data"`
}

type SearchResponse

type SearchResponse struct {
	Success bool `json:"success"`
	Data    struct {
		Items []struct {
			ResultScore float64 `json:"result_score"`
			Item        struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"item"`
		} `json:"items"`
	} `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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