# Author:       Li Junhao       l@x-cmd.com
# shellcheck    shell=sh        disable=SC2039,SC1090,SC3043,SC2263

# license:      AGPLv3

___x_cmd log init ossinsight

xrc:mod:lib     ossinsight   cfg  api  util  collection/_index  trend/_index  stargazer/_index  issue/_index  pr/_index

# OSSInsight API Base URL
___X_CMD_OSSINSIGHT_API_ENDPOINT="https://api.ossinsight.io/v1"

___x_cmd_ossinsight(){
    [ "$#" -gt 0 ] || set -- --help
    local op="$1"; shift
    case "$op" in
        -h|--help)      ___x_cmd help -m ossinsight "$@" ;;

        cfg|--cfg)      ___x_cmd_ossinsight_cfg "$@" ;;

        collection|trend|stargazer|issue|pr)
            ___x_cmd_ossinsight_"$op" "$@" ;;

        *)              M="Not found command - 'x ossinsight $op'" N=ossinsight log:ret:1
    esac
}

xrc setmain ___x_cmd_ossinsight