{"id":23353722,"url":"https://github.com/tzmfreedom/goroon","last_synced_at":"2025-04-10T06:04:13.315Z","repository":{"id":57593287,"uuid":"76363202","full_name":"tzmfreedom/goroon","owner":"tzmfreedom","description":"Cybozu garoon library and command line interface by golang","archived":false,"fork":false,"pushed_at":"2018-09-11T11:11:18.000Z","size":76,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T07:11:22.523Z","etag":null,"topics":["cli","garoon","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tzmfreedom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-13T13:55:26.000Z","updated_at":"2019-01-04T02:32:19.000Z","dependencies_parsed_at":"2022-09-12T16:20:57.373Z","dependency_job_id":null,"html_url":"https://github.com/tzmfreedom/goroon","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmfreedom%2Fgoroon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmfreedom%2Fgoroon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmfreedom%2Fgoroon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tzmfreedom%2Fgoroon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tzmfreedom","download_url":"https://codeload.github.com/tzmfreedom/goroon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166937,"owners_count":21058481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","garoon","golang"],"created_at":"2024-12-21T09:15:46.836Z","updated_at":"2025-04-10T06:04:13.267Z","avatar_url":"https://github.com/tzmfreedom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/tzmfreedom/goroon.svg?branch=master)](https://travis-ci.org/tzmfreedom/goroon)\n\n# Goroon\n\nCommand Line Interface and Library for Garoon with Go language\n\n## Install\n\n### CLI\n\nMacOS user can use homebrew to install goroon\n```bash\n$ brew tap tzmfreedom/goroon\n$ brew install goroon\n```\n\nIf you want to use latest version of goroon, execute following command.\n```bash\n$ go get -u github.com/tzmfreedom/goroon/goroon\n```\n\n### Library\n\n```bash\n$ go get github.com/tzmfreedom/goroon\n```\n\n## Usage\n\n```\nNAME:\n   goroon - garoon utility\n\nUSAGE:\n   goroon [global options] command [command options] [arguments...]\n\nVERSION:\n   0.1.0\n\nCOMMANDS:\n     login, l     login to garoon\n     schedule, s  get your schedule\n     bulletin, b  get bulletin\n     help, h      Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help\n   --version, -v  print the version\n```\n\nGet schedule on target date\n```\nNAME:\n   goroon schedule - get your schedule\n\nUSAGE:\n   goroon schedule [command options] [arguments...]\n\nOPTIONS:\n   --username value, -u value   [$GAROON_USERNAME]\n   --password value, -p value   [$GAROON_PASSWORD]\n   --endpoint value, -e value   [$GAROON_ENDPOINT]\n   --userid value, -i value\n   --start value\n   --end value\n   --type value, -t value      (default: \"all\")\n   --columns value, -c value   (default: \"detail,start,end\")\n   --debug, -D\n   --date value, -d value\n```\n\nGet my schedule on target date\n```bash\n$ goroon schedule -u {USERNAME} -p {PASSWORD} -e {ENDPOINT} --start {START DATETIME} --end {END DATETIME}\n$ goroon schedule -u {USERNAME} -p {PASSWORD} -e {ENDPOINT} -d {DATE:[today|yesterday]}\n\nex)\n$ goroon schedule -u hoge -p fuga -e https//hoge.garoon.com/grn.exe \\\n  --start '2017-03-01 00:00:00' --end '2017-03-01 23:59:59'\n$ goroon schedule -u hoge -p fuga -e https//hoge.garoon.com/grn.exe -d today # get today's your schedule\n$ goroon schedule -u hoge -p fuga -e https//hoge.garoon.com/grn.exe # get today's your schedule\n```\n\nGet target user's schedule\n```bash\n$ goroon schedule -u {USERNAME} -p {PASSWORD} -e {ENDPOINT} --start {START DATETIME} --end {END DATETIME} --userid {USER ID}\n```\n\nGet bulletin\n```\nNAME:\n   goroon bulletin - get bulletin\n\nUSAGE:\n   goroon bulletin [command options] [arguments...]\n\nOPTIONS:\n   --username value, -u value   [$GAROON_USERNAME]\n   --password value, -p value   [$GAROON_PASSWORD]\n   --endpoint value, -e value   [$GAROON_ENDPOINT]\n   --topic_id value            (default: 0)\n   --offset value, -o value    (default: 0)\n   --limit value, -l value     (default: 20)\n   --debug, -D\n   --columns value, -c value   (default: \"creator,text\")\n```\n\n```bash\n$ goroon bulleting -u {USERNAME} -p {PASSWORD} -e {ENDPOINT}\n```\n\nLogin to garoon\n```bash\nNAME:\n   goroon login - login to garoon\n\nUSAGE:\n   goroon login [command options] [arguments...]\n\nOPTIONS:\n   --username value, -u value   [$GAROON_USERNAME]\n   --password value, -p value   [$GAROON_PASSWORD]\n   --endpoint value, -e value   [$GAROON_ENDPOINT]\n   --debug, -D\nex)\n$ goroon login -u hoge -p fuga -e \"https://hoge.garoon.com/grn.exe\"\n```\nThe credentials, that is username, password, endpoint, is required on any goroon command.\nFor this reason, it's hard to use these commands. Login subcommand solve the problem.\nIf you call garoon login subcommand, goroon create `.goroon` file on your home path and write session id and endpoint on it.\nWhen `.goroon` file exists, every command read `.goroon` file and use information on file to login to garoon.\n\nFor example, if you called login command, you can use the following command to get your schedule on today.\n```bash\n$ goroon schedule\n```\n\n### Library\n\nInitialize by credentials\n\n```\nclient := goroon.NewClient(\"input garoon endpoint\")\nclient.Username = \"input your username\"\nclient.Password = \"input your password\"\n```\n\nInitialize by sessionId\n\n```\nclient := goroon.NewClient(\"input garoon endpoint\")\nclient.SessionId = \"input your sessionId\"\n```\n\nGet my schedule on target date\n\n```golang\nstart := time.Date(2017, 1, 1, 0, 0, 0, 0, time.Local)\nend := time.Date(2017, 1, 1, 23, 59, 59, 999999, time.Local)\n\nres, err := client.ScheduleGetEvents(\u0026goroon.Parameters{\n  Start: goroon.XmlDateTime{start},\n  End:   goroon.XmlDateTime{end},\n})\nif err != nil {\n  return err\n}\nfor _, sch := range res.ScheduleEvents {\n  fmt.Println(event.Id)\n  fmt.Println(event.Members)\n  fmt.Println(event.EventType)\n  fmt.Println(event.Detail)\n  fmt.Println(event.Description)\n  if event.When.Datetime.Start == new(time.Time) {\n    fmt.Println(event.When.Date.Start.Format(\"2006-01-02\"))\n    fmt.Println(event.When.Date.End.Format(\"2006-01-02\")\n  } else {\n    fmt.Println(event.When.Datetime.Start.Format(\"2006-01-02T15:04:05\"))\n    fmt.Println(event.When.Datetime.End.Format(\"2006-01-02T15:04:05\"))\n  }\n}\n```\n\nGet UserId from login name\n\n```golang\nres, err := client.BaseGetUserByLoginName(\u0026goroon.Parameters{\n  LoginName: []string{\"hogehoge\"},\n})\nif err != nil {\n  return err\n}\nfmt.Println(res.LoginId)\n```\n\nGet Bulletin folows\n\n```golang\nres, err := client.BulletinGetFollows(\u0026goroon.Parameters{\n  TopicId: 1234,\n  Offset:  0,\n  Limit:   20,\n})\nif err != nil {\n  return err\n}\n\nfor _, follow := range res.Follow {\n  fmt.Println(fmt.Sprint(follow.Number))\n  fmt.Println(follow.Creator.Name)\n  fmt.Println(follow.Text)\n}\n```\n\nDebug your request\n\n```\nclient := goroon.NewClient(\"https://garoon.hogehoge.com/grn.exe\")\nclient.Debugger = os.Stdout\n```\nDebugger property is io.Writer interface.\nYou can debug out to anywhere with io.Writer.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzmfreedom%2Fgoroon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftzmfreedom%2Fgoroon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftzmfreedom%2Fgoroon/lists"}