ftrack-golang-api

module
v0.0.0-...-d474664 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2020 License: MIT

README

Ftrack Golang API

Partially ported from ftrack-javascript-api

Basic usage
package main

import (
	"flag"
	"github.com/conducte/ftrack-golang-api/ftrack"
	"log"
)

func main() {
	apiKey := flag.String("api_key", "", "Ftrack Api Key from Settings -> Api Keys")
	apiUser := flag.String("api_user", "", "Ftrack Api User username from enabled user")
	serverUrl := flag.String("server_url", "", "Ftrack Server Url server url eg https://ftrack.com")
    flag.Parse()
	// Construct Session from command line arguments 
	session, err := ftrack.NewSession(ftrack.SessionConfig{
		ApiKey:    *apiKey,
		ApiUser:   *apiUser,
		ServerUrl: *serverUrl,
	})
	if err != nil {
		log.Fatal(err)
	}

	// Query single Task from server     
	result, err := session.Query("select name, parent.project from Task limit 1")
	if err != nil {
		log.Fatal(err)
	}
	task := result.Data[0]
	log.Println("Task: ", task)
}

Roadmap:
  • Documentation and examples
  • EventHub support
  • Entity type, to allow easy entity manipulations
  • More tests

Contributions and issues welcomed as well as any feedback!

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL