github::ActivityMonitor method get (public)
<instance of github::ActivityMonitor> get path [ query_args ]
Defined in packages/xowiki/tcl/github-activity-monitor-procs.tcl
Issue an API call on GitHub for the configured organization.
- Parameters:
- path (required)
- query_args (optional)
- Testcases:
- No testcase defined.
Source code: set url "${:api_base}${path}" # default query arg dict set query per_page 100 foreach {k v} $query_args { dict set query $k $v } set urlDict [ns_parseurl $url] dict set urlDict query [join [lmap {k v} $query {string cat $k=$v}] &] set headers [ns_set create headers Authorization "Bearer ${:api_token}" Accept "application/vnd.github+json" User-Agent "openacs-activity-dashboard/1.0" ] ns_log notice request: [list ns_http run -method GET -headers $headers [ns_joinurl $urlDict]] #error 1 set result [ns_http run -method GET -headers $headers [ns_joinurl $urlDict]] set status [dict get $result status] set body [dict get $result body] if {$status < 200 || $status >= 300} { ns_log Error "GitHub GET $url failed: status $status, body: $body" error "GitHub API error $status" } return $bodyXQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)