Socket
Socket
Sign inDemoInstall

github.com/cseeger-epages/i-doit-go-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/cseeger-epages/i-doit-go-api


Version published
Created
Source

i-doit-go-api/goidoit

Donate GoDoc Go Report Card License Build Status Built with Mage Coverage

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.

Installation

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

Usage

Simple example

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)
}

Advanced examples

There are more advanced examples documented in the repo for common use cases.

Code Documentation

You find the full code documentation here

Code Testing

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

Additional Informations

This project uses sematic versioning.

Other great client implementations

Thanks for your code inspirations!

Contribution

Thank you for participating to this project. Please see our Contribution Guidlines for more information.

FAQs

Package last updated on 16 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc