Go SDK to Manage Tasks in the Cloud
Aspose.Tasks for Cloud offers the ability to manipulate and convert Microsoft Project MPT, MPP, MPX & Oracle Primavera XER, XML, and PrimaveraP6XML files in the Cloud. Aspose.Tasks Cloud SDK for Go wraps the REST API to make it easier for the developers to integrate Task Management features in their own cloud-based Go applications.
Feel free to explore the Developer's Guide & API Reference to know all about Aspose.Tasks Cloud API.
REST API for Task Management
Read & Write Project Data
Microsoft Project MPP, XML, MPT Primavera MPX
Save Project Data As
XER, XLSX, HTML, XML, TXT, TIF, SVG, PNG, JPEG
Getting Started with Aspose.Tasks Cloud SDK for Go
Firstly, create an account at Aspose for Cloud to get your application information and free quota to use the API.
Install Aspose.Tasks-Cloud
From Visual Stuio Code:
Add "github.com/aspose-tasks-cloud/aspose-tasks-cloud-go/api" and "github.com/aspose-tasks-cloud/aspose-tasks-cloud-go/api/models" in the import section of your code
From the command line:
go get -v github.com/aspose-tasks-cloud/aspose-tasks-cloud-go/api
The complete source code is available at GitHub Repository.
Sample usage via the SDK
The examples below show how your application have to initiate and get assignments from you project file using Aspose.Tasks-Cloud library:
Config.json file:
{
"AppKey": "your app key",
"AppSid": "your app sid",
"BaseUrl": "https://api.aspose.cloud"
}
Go code:
// Start README example
// init tasks cloud api
config, _ := models.NewConfiguration(configFilePath)
tasksApi, ctx, _ := api.CreateTasksApi(config)
// upload sample.mpp to a cloud
// uploaded_sample.mpp is a name in the cloud
file, _ := os.Open("sample.mpp")
tasksApi.UploadFile(ctx, &requests.UploadFileOpts{
File: file,
Path: "uploaded_sample.mpp",
})
// get assignments from the project file
options := &requests.GetAssignmentsOpts{
Name: "uploaded_sample.mpp",
}
result, _, err := tasksApi.GetAssignments(ctx, options)
if err != nil {
//error handling
}
fmt.Println(result.Assignments.AssignmentItem[0].Uid)
// End README example
Product Page | Documentation | API Reference | Code Samples | Blog | Free Support | Free Trial