BMLT Admin API Documentation
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.0.0
- Package version: 1.1.0
- Generator version: 7.14.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import bmlt "github.com/bmlt-enabled/bmlt-server-go-client"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value bmlt.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), bmlt.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value bmlt.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), bmlt.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using bmlt.ContextOperationServerIndices
and bmlt.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), bmlt.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), bmlt.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
All URIs are relative to http://localhost:8000/main_server
Class | Method | HTTP request | Description |
---|---|---|---|
RootServerAPI | AuthLogout | Post /api/v1/auth/logout | Revokes a token |
RootServerAPI | AuthRefresh | Post /api/v1/auth/refresh | Revokes and issues a new token |
RootServerAPI | AuthToken | Post /api/v1/auth/token | Creates a token |
RootServerAPI | CreateErrorTest | Post /api/v1/errortest | Tests some errors |
RootServerAPI | CreateFormat | Post /api/v1/formats | Creates a format |
RootServerAPI | CreateMeeting | Post /api/v1/meetings | Creates a meeting |
RootServerAPI | CreateServiceBody | Post /api/v1/servicebodies | Creates a service body |
RootServerAPI | CreateUser | Post /api/v1/users | Creates a user |
RootServerAPI | DeleteFormat | Delete /api/v1/formats/{formatId} | Deletes a format |
RootServerAPI | DeleteMeeting | Delete /api/v1/meetings/{meetingId} | Deletes a meeting |
RootServerAPI | DeleteServiceBody | Delete /api/v1/servicebodies/{serviceBodyId} | Deletes a service body |
RootServerAPI | DeleteUser | Delete /api/v1/users/{userId} | Deletes a user |
RootServerAPI | GetFormat | Get /api/v1/formats/{formatId} | Retrieves a format |
RootServerAPI | GetFormats | Get /api/v1/formats | Retrieves formats |
RootServerAPI | GetLaravelLog | Get /api/v1/logs/laravel | Retrieves laravel log |
RootServerAPI | GetMeeting | Get /api/v1/meetings/{meetingId} | Retrieves a meeting |
RootServerAPI | GetMeetingChanges | Get /api/v1/meetings/{meetingId}/changes | Retrieve changes for a meeting |
RootServerAPI | GetMeetings | Get /api/v1/meetings | Retrieves meetings |
RootServerAPI | GetRootServer | Get /api/v1/rootservers/{rootServerId} | Retrieves a root server |
RootServerAPI | GetRootServers | Get /api/v1/rootservers | Retrieves root servers |
RootServerAPI | GetServiceBodies | Get /api/v1/servicebodies | Retrieves service bodies |
RootServerAPI | GetServiceBody | Get /api/v1/servicebodies/{serviceBodyId} | Retrieves a service body |
RootServerAPI | GetUser | Get /api/v1/users/{userId} | Retrieves a single user |
RootServerAPI | GetUsers | Get /api/v1/users | Retrieves users |
RootServerAPI | PartialUpdateUser | Patch /api/v1/users/{userId} | Patches a user |
RootServerAPI | PatchFormat | Patch /api/v1/formats/{formatId} | Patches a format |
RootServerAPI | PatchMeeting | Patch /api/v1/meetings/{meetingId} | Patches a meeting |
RootServerAPI | PatchServiceBody | Patch /api/v1/servicebodies/{serviceBodyId} | Patches a service body |
RootServerAPI | UpdateFormat | Put /api/v1/formats/{formatId} | Updates a format |
RootServerAPI | UpdateMeeting | Put /api/v1/meetings/{meetingId} | Updates a meeting |
RootServerAPI | UpdateServiceBody | Put /api/v1/servicebodies/{serviceBodyId} | Updates a Service Body |
RootServerAPI | UpdateUser | Put /api/v1/users/{userId} | Update single user |
- AuthenticationError
- AuthorizationError
- ConflictError
- ErrorTest
- Format
- FormatBase
- FormatCreate
- FormatPartialUpdate
- FormatTranslation
- FormatUpdate
- Meeting
- MeetingBase
- MeetingChangeResource
- MeetingCreate
- MeetingPartialUpdate
- MeetingUpdate
- NotFoundError
- RootServer
- RootServerBase
- RootServerBaseStatistics
- RootServerBaseStatisticsMeetings
- RootServerBaseStatisticsServiceBodies
- ServerError
- ServiceBody
- ServiceBodyBase
- ServiceBodyCreate
- ServiceBodyPartialUpdate
- ServiceBodyUpdate
- Token
- TokenCredentials
- User
- UserBase
- UserCreate
- UserPartialUpdate
- UserUpdate
- ValidationError
Authentication schemes defined for the API:
- Type: OAuth
- Flow: password
- Authorization URL:
- Scopes: N/A
Example
auth := context.WithValue(context.Background(), bmlt.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, bmlt.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime