is an I-doit API client implementation written in GOLANG.
Its focused on simplicity to create easy writable code for your projects.
the package supports:
- Login
- Requests
- Searching
- Getting object information by id, id slice, string or custom field
- creating, altering, deleting, archiving, quickpurging objects
- reports
- categories (only parts implemented) (wip)
- object_type_categories
- dialog
Other types of requests like
- object_types (coming soon)
- object_type_groups (coming soon)
- objects_by_relation (coming soon)
- categories (category, category_info) (wip)
- location_tree
- workstation_components
- logbook
- impact
are not implemented yet (and maybe never will) but can easily be implemented using the goidoit.Request function there are some advanced examples of how to do this.
There is also a second repo i-doit-go-tools where you can find some more scripts for special use-cases that can be used as an even more advanced example :P.
If you already installed GO on your system and configured it properly than its simply:
go get github.com/virtomize/i-doit-go-api
If not follow these instructions
package main
import (
"fmt"
"github.com/virtomize/i-doit-go-api"
)
func main() {
// create api object
a, _ := goidoit.NewAPI("https://example.com/src/jsonrpc.php", "yourapikey")
// or login using X-RPC-Auth (recommended)
// a, _ := goidoit.NewLogin("https://example.com/src/jsonrpc.php", "yourapikey", "username", "password")
// search for sth like test
s, _ := a.Search("test")
// thats it
fmt.Println(s)
}
There are more advanced examples documented in the repo for common use cases.
You find the full code documentation here
This library uses mage for testing and coverage. After installing mage just run:
mage test
also code coverage in detail can be seen via browser by using
mage coverage
This project uses sematic versioning.
- Benjamin Heisigs i-doit-api-client-php
- Dennis Stückens i-doit-api-clients
Thanks for your code inspirations!
Thank you for participating to this project. Please see our Contribution Guidlines for more information.