An open API service indexing awesome lists of open source software.

https://github.com/burakkaraceylan/xapi-go

A fast xApi client implementation written in Go
https://github.com/burakkaraceylan/xapi-go

api client experience golang xapi

Last synced: 29 days ago
JSON representation

A fast xApi client implementation written in Go

Awesome Lists containing this project

README

          

# XGO-API
[![Go Reference](https://pkg.go.dev/badge/github.com/burakkaraceylan/xapi-go.svg)](https://pkg.go.dev/github.com/burakkaraceylan/xapi-go)
[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/gomods/athens.svg)](https://github.com/gomods/athens)
[![codecov](https://codecov.io/gh/burakkaraceylan/xapi-go/branch/main/graph/badge.svg?token=ECR4A27QDV)](https://codecov.io/gh/burakkaraceylan/xapi-go)
[![Go Report Card](https://goreportcard.com/badge/github.com/burakkaraceylan/xapi-go)](https://goreportcard.com/report/github.com/burakkaraceylan/xapi-go)

## Overview

XGO-Api is a client library implemention for The Experience API (or xAPI) written in Golang. Repo also includes a CLI tool that can query learning record stores.

## The Experience API (xAPI)

The Experience API (or xAPI) is a new specification for learning technology that makes it possible to collect data about the wide range of experiences a person has (online and offline). This API captures data in a consistent format about a person or group’s activities from many technologies. Very different systems are able to securely communicate by capturing and sharing this stream of activities using xAPI’s simple vocabulary.

## Installation
go get github.com/burakkaraceylan/xapi-go@latest
## Basic Usage
lrs, err := client.NewRemoteLRS(
"https://cloud.scorm.com/ScormEngineInterface/TCAPI/public/",
"1.0.0",
"Basic VGVzdFVzZXI6cGFzc3dvcmQ=",
)

if err != nil {
panic(err)
}

statement, err := lrs.GetStatement("b1893eed-14e6-4ac2-b154-3c6e828c2297")

if err != nil {
panic(err)
}

str, _ := utils.ToJson(stmt, true)
fmt.Println(str)

## CLI Usage
Usage:
xapi-go [flags]
xapi-go [command]

Available Commands:
completion Generate the autocompletion script for the specified shell
getStatement
help Help about any command

Flags:
--auth string Authentication header (Basic, Bearer etc...)
--endpoint string URL of the API endpoint
-h, --help help for xapi-go
--password string API user's password
--username string API user's username
--version string API version

Use "xapi-go [command] --help" for more information about a command.

## TODO
### Module
- [x] About Resource
- [X] Statement Resource
- [X] State Resource
- [X] Documents Resource
- [X] Agents Resource
- [X] Activities Resource
- [X] Agent Profile Resource
- [X] Activity Profile Resource

### Improvements
- [ ] Better error handling
- [ ] Better document
- [ ] More tests