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
- Host: GitHub
- URL: https://github.com/burakkaraceylan/xapi-go
- Owner: burakkaraceylan
- License: other
- Created: 2022-08-05T18:45:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-15T11:18:09.000Z (over 3 years ago)
- Last Synced: 2024-06-21T09:39:41.834Z (over 1 year ago)
- Topics: api, client, experience, golang, xapi
- Language: Go
- Homepage:
- Size: 346 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# XGO-API
[](https://pkg.go.dev/github.com/burakkaraceylan/xapi-go)
[](https://github.com/gomods/athens)
[](https://codecov.io/gh/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