Skip to content

Commit d0f5a5c

Browse files
Merge pull request #1 from Plaenkler/development
Implementation of version 1.0.0
2 parents 7bee80a + 94a8c67 commit d0f5a5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1195
-807
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: "gomod"
6+
directory: "/"
7+
schedule:
8+
interval: "daily"

.github/linters/.golangci.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
3+
run:
4+
concurrency: 4
5+
timeout: 240s
6+
issues-exit-code: 2
7+
tests: false
8+
go: '1.19'
9+
10+
linters:
11+
# start with everything
12+
enable-all: true
13+
14+
disable:
15+
# deprecated
16+
- golint
17+
- interfacer
18+
- maligned
19+
- scopelint
20+
- deadcode
21+
- varcheck
22+
- structcheck
23+
24+
# too annoying
25+
- cyclop
26+
- exhaustive
27+
- exhaustivestruct
28+
- exhaustruct
29+
- forbidigo
30+
- funlen
31+
- gochecknoglobals
32+
- godot
33+
- goerr113
34+
- gofumpt
35+
- gomnd
36+
- lll
37+
- nakedret
38+
- nestif
39+
- nlreturn
40+
- tagliatelle
41+
- varnamelen
42+
- wsl
43+
- nonamedreturns
44+
45+
# review later
46+
- gofmt
47+
- goimports
48+
49+
# complexity linters
50+
- gocognit
51+
- gocyclo
52+
- maintidx
53+
54+
# i disagree with these
55+
- wrapcheck
56+
- nolintlint
57+
- errorlint
58+
- noctx
59+
- gochecknoinits
60+
61+
# should not block the build
62+
- prealloc
63+
- godox
64+
- dupl
65+
- goconst
66+
- ifshort
67+
- nilerr
68+
- ireturn
69+
- nosprintfhostport
70+
71+
# buggy
72+
- gci
73+
74+
# this breaks with proto generation
75+
- nosnakecase
76+
77+
# disabled because of generics
78+
- rowserrcheck
79+
- sqlclosecheck
80+
- structcheck
81+
- wastedassign
82+
83+
linters-settings:
84+
wsl:
85+
allow-cuddle-declarations: true

.github/workflows/codeql.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
3+
name: CodeQL
4+
5+
on:
6+
push:
7+
branches: main
8+
pull_request:
9+
branches: main
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: ['go']
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
34+
- name: Autobuild
35+
uses: github/codeql-action/autobuild@v2
36+
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@v2

.github/workflows/linters.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
3+
name: Linters
4+
5+
on:
6+
push:
7+
branches: main
8+
pull_request:
9+
branches: main
10+
11+
jobs:
12+
build:
13+
name: Lint Code Base
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Lint Code Base
23+
uses: github/super-linter/slim@v4
24+
env:
25+
DEFAULT_BRANCH: main
26+
VALIDATE_ALL_CODEBASE: true
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
1-
# booklooker
2-
Implementation of the Booklooker.de REST API v2.0
1+
# 📖 Booklooker
2+
3+
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
4+
[![Linters](https://github.com/Plaenkler/Booklooker/actions/workflows/linters.yml/badge.svg)](https://github.com/Plaenkler/Booklooker/actions/workflows/linters.yml)
5+
[![Support me](https://img.shields.io/badge/Support%20me%20%E2%98%95-orange.svg)](https://www.buymeacoffee.com/Plaenkler)
6+
7+
Plaenkler/Booklooker enables HTTP requests to be made to the Booklooker API. The library abstracts the constructs and allows developers to interact with the Booklooker API through a convenient and intuitive interface.
8+
9+
<table style="border:none;">
10+
<tr>
11+
<td><img src="https://user-images.githubusercontent.com/60503970/217090657-d8d08ec3-fe4b-45ec-ab10-d48f767c4695.png" width="480"/></td>
12+
<td><img src="https://user-images.githubusercontent.com/60503970/217090678-891a25b7-0b06-41fe-bbf5-f3933f81bef5.png" width="480"/></td>
13+
</tr>
14+
</table>
15+
16+
## 🎯 Project goals
17+
18+
- [x] Implementation of all models and handlers
19+
- [x] Client with automatic token renewal
20+
- [x] Implementation of one example for each handler
21+
22+
## ✅ Examples
23+
24+
A separate example has been implemented for each interface of the API. All examples use the client for authentication except the authentication example itself if there is a desire to implement a separate client.
25+
26+
- [Immediate deletion of a single item](https://github.com/Plaenkler/Booklooker/tree/main/examples/article)
27+
- [Download all active part numbers](https://github.com/Plaenkler/Booklooker/tree/main/examples/article_list)
28+
- [Query the status of an item](https://github.com/Plaenkler/Booklooker/tree/main/examples/article_status)
29+
- [Authentication via API Key](https://github.com/Plaenkler/Booklooker/tree/main/examples/authenticate)
30+
- [Upload quote or image files](https://github.com/Plaenkler/Booklooker/tree/main/examples/file_import)
31+
- [Query the status of an uploaded quote file](https://github.com/Plaenkler/Booklooker/tree/main/examples/file_status)
32+
- [Download of all orders of a time range](https://github.com/Plaenkler/Booklooker/tree/main/examples/order)
33+
- [Canceling a complete order](https://github.com/Plaenkler/Booklooker/tree/main/examples/order_cancel)
34+
- [Canceling the order of a single item](https://github.com/Plaenkler/Booklooker/tree/main/examples/order_item_cancel)
35+
- [Sending a message to the customer](https://github.com/Plaenkler/Booklooker/tree/main/examples/order_message)
36+
- [Setting the status of an order](https://github.com/Plaenkler/Booklooker/tree/main/examples/order_status)

api/handler/article.go

Lines changed: 0 additions & 39 deletions
This file was deleted.

api/handler/article_list.go

Lines changed: 0 additions & 37 deletions
This file was deleted.

api/handler/article_status.go

Lines changed: 0 additions & 28 deletions
This file was deleted.

api/handler/authenticate.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

api/handler/constants.go

Lines changed: 0 additions & 5 deletions
This file was deleted.

api/handler/file_import.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)