Skip to content

Commit 3e0bd74

Browse files
authored
Merge branch 'master' into feature/O2B-308
2 parents 62f88eb + 7cd0cf7 commit 3e0bd74

File tree

5 files changed

+475
-100
lines changed

5 files changed

+475
-100
lines changed

go-api-client/Example.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
package main
22

3-
import apiClient "./src"
4-
import sw "./src/go-client-generated"
3+
import (
4+
apiClient "github.com/AliceO2Group/Bookkeeping/go-api-client/src"
5+
sw "github.com/AliceO2Group/Bookkeeping/go-api-client/src/go-client-generated"
6+
)
57

68
func main() {
7-
// Set base url and api token
8-
baseUrl := "http://vm4.jiskefet.io/api"
9-
apiToken := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NzQ2NjQwLCJ1c2VybmFtZSI6ImF3ZWdyenluIiwiYWNjZXNzIjoxLCJpYXQiOjE2MTA1NDM0ODYsImV4cCI6MTYxMDYyOTg4NiwiaXNzIjoibzItdWkifQ.8pM1K0HIfpnZop7bJk_rD5GvkfeiWaNNs2S7ZM1tqYg"
9+
// Set base url and api token
10+
baseUrl := "http://vm4.jiskefet.io/api"
11+
apiToken := "<insert jwt token>"
1012

1113
// Initialize api with manual JWT token + baseurl
1214
// TODO: generate correct JWT token instead of manual insertion
1315
apiClient.InitializeApi(baseUrl, apiToken)
1416

15-
// Create a run
16-
apiClient.CreateRun("cpp-api", 5, 5, 1, 9000, sw.COSMICS_RunType, 12040213, 12040213)
17+
// Create a run
18+
apiClient.CreateRun("go-api", 5, 5, 1, 9000, sw.COSMICS_RunType, 12040213, 12040213)
1719

1820
// Update a run
1921
apiClient.UpdateRun(9000, sw.BAD_RunQuality, 12040213, 12040213)

go-api-client/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Go dependencies
44
```go
55
go get golang.org/x/oauth2
6+
go build
67
```
78

89
# API endpoints

go-api-client/go.mod

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module github.com/AliceO2Group/Bookkeeping/cpp-api-client
2+
3+
go 1.15
4+
5+
require (
6+
github.com/AliceO2Group/Bookkeeping v0.16.4
7+
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93
8+
)

0 commit comments

Comments
 (0)