Awesome Go

go-openproject

CategoryThird-party APIs
SubcategoryThird-party APIs
Stars0

Go client library for interacting with [OpenProject](https://docs.openproject.org/api/) API

About go-openproject

OpenProject Go Client Library

codecov Go Report Card Go Reference License: MIT

Go client library for OpenProject

Openproject client library written in Go

API doc

https://docs.openproject.org/api

Usage examples

Single work-package request

Basic work-package retrieval (Single work-package with ID 36353 from community.openproject.org) Please check examples folder for different use-cases.

import (
	"fmt"
	openproj "github.com/manuelbcd/go-openproject"
)

func main() {
	client, _ := openproj.NewClient(nil, "https://community.openproject.org/")
	wpResponse, _, err := client.WorkPackage.Get("36353", nil)
	if err != nil {
		panic(err)
	}

	// Output specific fields from response
	fmt.Printf("\n\nSubject: %s \nDescription: %s\n\n", wpResponse.Subject, wpResponse.Description.Raw)
}

Create a work package

Create a single work package

package main

import (
	"fmt"
	"strings"

	openproj "github.com/manuelbcd/go-openproject"
)

func main() {
	client, err := openproj.NewClient(nil, "https://youropenproject.url")
	if err != nil {
		fmt.Printf("\nerror: %v\n", err)
		return
	}

	i := openproj.WorkPackage{
		Subject: "This is my test work package",
		Description: &openproj.WPDescription{
			Format: "textile",
			Raw:    "This is just a demo workpackage description",
		},
	}

	wpResponse, _, err := client.WorkPackage.Create(&i, "demo-project")
	if err != nil {
		panic(err)
	}

	// Output specific fields from response
	fmt.Printf("\n\nSubject: %s \nDescription: %s\n\n", wpResponse.Subject, wpResponse.Description.Raw)
}

Supported objects

EndpointGET singleGET manyPOSTPUTDELETE
Attachments (Info):heavy_check_mark::heavy_check_mark:implementing-pending
Attachments (Download):heavy_check_mark:----
Categories:heavy_check_mark::heavy_check_mark:---
Documentsimplementing----
Projects:heavy_check_mark::heavy_check_mark::heavy_check_mark:pendingpending
Queries:heavy_check_mark::heavy_check_mark::heavy_check_mark:-:heavy_check_mark:
Schemaspending
Statuses:heavy_check_mark::heavy_check_mark:pendingpendingpending
Users:heavy_check_mark::heavy_check_mark::heavy_check_mark::heavy_check_mark:
Wiki Pages:heavy_check_mark:pendingpendingpendingpending
WorkPackages:heavy_check_mark::heavy_check_mark::heavy_check_mark::heavy_check_mark:
Activities:heavy_check_mark::heavy_check_mark:

Thanks

Thanks Wieland, Oliver and OpenProject team for your support.

Thank you very much Andy Grunwald for the idea and your base code.

Inspired in Go Jira library

Frequently Asked Questions

What is go-openproject?

go-openproject is a Third-party APIs library for the Go programming language. Go client library for interacting with [OpenProject](https://docs.openproject.org/api/) API

How do I install go-openproject?

Install go-openproject with the Go module system using `go get manuelbcd/go-openproject`. Check the repository for the current installation instructions.

What category does go-openproject belong to?

go-openproject is listed under Third-party APIs, specifically Third-party APIs.

← Back to Third-party APIs