Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewpoer/gocvent
A Golang wrapper for some common Cvent SOAP API functions
https://github.com/matthewpoer/gocvent
cvent go golang soap
Last synced: 1 day ago
JSON representation
A Golang wrapper for some common Cvent SOAP API functions
- Host: GitHub
- URL: https://github.com/matthewpoer/gocvent
- Owner: matthewpoer
- License: mit
- Created: 2019-03-16T17:25:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-05T15:51:19.000Z (over 5 years ago)
- Last Synced: 2024-06-21T14:20:20.491Z (5 months ago)
- Topics: cvent, go, golang, soap
- Language: Go
- Size: 68.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gocvent [![Go Report Card](https://goreportcard.com/badge/github.com/matthewpoer/gocvent)](https://goreportcard.com/report/github.com/matthewpoer/gocvent)
A Golang wrapper for some common [Cvent SOAP API](https://developers.cvent.com/documentation/soap-api/) functions.
## Thanks to gosoap
[gosoap](https://github.com/tiaguinho/gosoap) gave this wrapper a big head start. There was a lot of hacking on gosoap to make it work with Cvent's API, so you will find it forked and included with `gocvent`.## Build your own Definitions
This package includes Golang Structures for the out-of-the-box versions of Contacts, Events, Registrations and Users CvObjects in the [`definitions/`](definitions/) directory. If you want to work with other CvObjects and/or use custom fields on these structures, you will need to build your own `struct`s using `cvent.StructGen("filePath", "CvObject")`, then use the resulting `struct`s in your Cvent API retrieve calls, e.g.```go
var objectDef objDefs.EventRetrieveResult
err := cvent.Retrieve("Event", v, &objectDef)
if err != nil {
fmt.Printf("TestRetrieveEvent err from cvent.Retrieve: %s", err)
}
fmt.Printf("Event Title: %s\n", objectDef.CvObject.EventTitle)
```## Check out the Tests
Demonstrations of each of the implemented Cvent API methods has at least one corresponding test in [gocvent_test.go](gocvent_test.go). Current implementation includes:
* [Login](https://developers.cvent.com/documentation/soap-api/call-definitions/authentication/login/)
* [DescribeCvObject](https://developers.cvent.com/documentation/soap-api/call-definitions/object-metadata-calls/describecvobject/)
* [DescribeGlobal](https://developers.cvent.com/documentation/soap-api/call-definitions/object-metadata-calls/describeglobal/)
* [Search](https://developers.cvent.com/documentation/soap-api/call-definitions/search-and-retrieve/search/) (only _AndSearch_ style filtering is currently implemented, see [CvSearchObject](https://developers.cvent.com/documentation/soap-api/object-definitions/cvsearchobject/) and [`gosoap/encode.go`](gosoap/encode.go#L76))
* [Retrieve](https://developers.cvent.com/documentation/soap-api/call-definitions/search-and-retrieve/retrieve/) (gocvent only supports retrieval of one record at a time, which is different than the Cvent's function which would support several. Pull requests welcomed.)