-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
2,037 additions
and
597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 'Auto Assign' | ||
name: "Auto Assign" | ||
on: | ||
pull_request: | ||
types: [opened, ready_for_review] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,6 @@ _testmain.go | |
# IDE files | ||
*.iml | ||
.idea/ | ||
|
||
.travis.yml | ||
git_push.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.travis.yml | ||
README.md | ||
api/openapi.yaml | ||
api_default.go | ||
client.go | ||
configuration.go | ||
docs/DefaultAPI.md | ||
docs/Request.md | ||
docs/Response.md | ||
git_push.sh | ||
go.mod | ||
go.sum | ||
model_request.go | ||
model_response.go | ||
response.go | ||
utils.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.3.1 | ||
7.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,127 @@ | ||
[![PkgGoDev](https://pkg.go.dev/badge/github.com/k0swe/qrz-logbook)](https://pkg.go.dev/github.com/k0swe/qrz-logbook) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/k0swe/qrz-logbook)](https://goreportcard.com/report/github.com/k0swe/qrz-logbook) | ||
# Go API client for qrzlog | ||
|
||
# Go API client for QRZ.com Logbook | ||
This API provides methods for external programs to interact with the QRZ Logbook | ||
using an HTTP REST interface. The QRZ Logbook is a combination free and paid | ||
subscription service of QRZ. Some advanced features require a valid subscription | ||
while the majority of operations are free to all QRZ members. All users of the | ||
QRZ Logbook, regardless of their subscription status, may access, edit, update, | ||
and view their complete logs online at the QRZ website. | ||
|
||
A GoLang client library for QRZ.com's Logbook data service. The service | ||
provides real-time access to information from QRZ.com logbooks. The API is | ||
documented [here](https://www.qrz.com/docs/logbook/QRZLogbookAPI.html). | ||
## Overview | ||
|
||
This client library was generated based on the OpenAPI specification in | ||
the `api/openapi.yaml` file. However, the API itself is not well-described by | ||
OpenAPI, so the generated library is supplemented with `wrapper.go`. | ||
This API client was generated by the | ||
[OpenAPI Generator](https://openapi-generator.tech) project. By using the | ||
[OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily | ||
generate an API client. | ||
|
||
A simple application to demonstrate how to integrate the library is located in | ||
`cmd/qrz-logbook/main.go`. | ||
|
||
A QRZ.com XML subscription is required to take full advantage of the API. A | ||
description of subscription plans and rates is available on the | ||
[QRZ.com website](http://www.qrz.com/i/subscriptions.html). | ||
- API version: 1.0.0 | ||
- Package version: 1.0.0 | ||
- Generator version: 7.10.0 | ||
- Build package: org.openapitools.codegen.languages.GoClientCodegen | ||
|
||
## Installation | ||
|
||
Install the following dependencies: | ||
|
||
```sh | ||
go get github.com/stretchr/testify/assert | ||
go get golang.org/x/net/context | ||
``` | ||
|
||
Put the package under your project folder and add the following in import: | ||
|
||
```go | ||
import qrzlog "github.com/k0swe/qrz-logbook" | ||
``` | ||
|
||
To use a proxy, set the environment variable `HTTP_PROXY`: | ||
|
||
```go | ||
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") | ||
``` | ||
|
||
## Configuration of Server URL | ||
|
||
Default configuration comes with `Servers` field that contains server objects as | ||
defined in the OpenAPI specification. | ||
|
||
### Select Server Configuration | ||
|
||
For using other server than the one defined on index 0 set context value | ||
`qrzlog.ContextServerIndex` of type `int`. | ||
|
||
```go | ||
ctx := context.WithValue(context.Background(), qrzlog.ContextServerIndex, 1) | ||
``` | ||
|
||
### Templated Server URL | ||
|
||
Templated server URL is formatted using default variables from configuration or | ||
from context value `qrzlog.ContextServerVariables` of type `map[string]string`. | ||
|
||
```go | ||
ctx := context.WithValue(context.Background(), qrzlog.ContextServerVariables, map[string]string{ | ||
"basePath": "v2", | ||
}) | ||
``` | ||
|
||
Note, enum values are always validated and all unused variables are silently | ||
ignored. | ||
|
||
### URLs Configuration per Operation | ||
|
||
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 | ||
`qrzlog.ContextOperationServerIndices` and | ||
`qrzlog.ContextOperationServerVariables` context maps. | ||
|
||
```go | ||
ctx := context.WithValue(context.Background(), qrzlog.ContextOperationServerIndices, map[string]int{ | ||
"{classname}Service.{nickname}": 2, | ||
}) | ||
ctx = context.WithValue(context.Background(), qrzlog.ContextOperationServerVariables, map[string]map[string]string{ | ||
"{classname}Service.{nickname}": { | ||
"port": "8443", | ||
}, | ||
}) | ||
``` | ||
|
||
## Documentation for API Endpoints | ||
|
||
All URIs are relative to *https://logbook.qrz.com/api* | ||
|
||
| Class | Method | HTTP request | Description | | ||
| ------------ | ------------------------------------------- | ------------ | -------------------------- | | ||
| _DefaultAPI_ | [**RootPost**](docs/DefaultAPI.md#rootpost) | **Post** / | The do-everything endpoint | | ||
|
||
## Documentation For Models | ||
|
||
- [Request](docs/Request.md) | ||
- [Response](docs/Response.md) | ||
|
||
## Documentation For Authorization | ||
|
||
Endpoints do not require authorization. | ||
|
||
## Documentation for Utility Methods | ||
|
||
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` | ||
|
||
## Author | ||
|
||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
packageName: qrzlog | ||
withGoCodegenComment: true | ||
globalProperties: | ||
skipFormModel: false |
Oops, something went wrong.