Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.14 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.14 KB

wrike.go Go PkgGoDev Go Report Card

Go implementation of Wrike API client

Basic usage

package main

import (
    "fmt"

    "github.com/AkihikoITOH/wrike.go"
)

func main() {
    conf := wrike.NewConfig("wrike-access-token", "") // Default host name is "app-eu.wrike.com"
    // To set a different host name:
    // conf := wrike.NewConfig("wrike-access-token", "www.wrike.com")
    api := wrike.NewAPI(conf)

    user, err := api.QueryUser("KUAAAA3E")
    if err != nil {
      panic(err)
    }

    fmt.Println(user.Kind)                      // => "users"
    fmt.Println(user.Data[0].ID)                // => "KUAAAA3E"
    fmt.Println(user.Data[0].Profiles[0].Email) // => "[email protected]"
}