Skip to content

Commit 16b7bbc

Browse files
committed
Update documentation
1 parent 06a5026 commit 16b7bbc

File tree

3 files changed

+63
-60
lines changed

3 files changed

+63
-60
lines changed

README.md

Lines changed: 5 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,65 +8,9 @@ the [comdirect REST API](https://www.comdirect.de/cms/kontakt-zugaenge-api.html)
88
> * Please read the comdirect API documentation prior to using this software
99
> * Use of this software is at your own risk
1010
11-
Install
11+
Documentation
1212
---
13-
Use `go get` to install the latest version of this library:
1413

15-
```bash
16-
$ go get -u github.com/jsattler/comdirect-golang
17-
```
18-
19-
Examples
20-
---
21-
In the following examples we are reading the comdirect credentials from predefined environment variables.
22-
23-
### Authentication
24-
25-
**Creating a new Authenticator from AuthOptions**:
26-
27-
```go
28-
// omitting error validation, imports and packages
29-
30-
options := &comdirect.AuthOptions{
31-
Username: os.Getenv("COMDIRECT_USERNAME"),
32-
Password: os.Getenv("COMDIRECT_PASSWORD"),
33-
ClientId: os.Getenv("COMDIRECT_CLIENT_ID"),
34-
ClientSecret: os.Getenv("COMDIRECT_CLIENT_SECRET"),
35-
}
36-
authenticator := options.NewAuthenticator()
37-
```
38-
39-
**Creating a new Authenticator with AuthOptions**:
40-
41-
```go
42-
// omitting error validation, imports and packages
43-
44-
options := &comdirect.AuthOptions{
45-
Username: os.Getenv("COMDIRECT_USERNAME"),
46-
Password: os.Getenv("COMDIRECT_PASSWORD"),
47-
ClientId: os.Getenv("COMDIRECT_CLIENT_ID"),
48-
ClientSecret: os.Getenv("COMDIRECT_CLIENT_SECRET"),
49-
}
50-
51-
authenticator := comdirect.NewAuthenticator(options)
52-
```
53-
54-
### Client Creation
55-
56-
**Create a new Client from AuthOptions**
57-
58-
```go
59-
// omitting error validation, imports and packages
60-
61-
options := &comdirect.AuthOptions{
62-
Username: os.Getenv("COMDIRECT_USERNAME"),
63-
Password: os.Getenv("COMDIRECT_PASSWORD"),
64-
ClientId: os.Getenv("COMDIRECT_CLIENT_ID"),
65-
ClientSecret: os.Getenv("COMDIRECT_CLIENT_SECRET"),
66-
}
67-
68-
client := comdirect.NewWithAuthOptions(options)
69-
```
7014

7115
Roadmap / To-Do
7216
---
@@ -84,6 +28,10 @@ Roadmap / To-Do
8428
* [x] Balance by Account ID
8529
* [x] Transactions
8630
* [ ] **Depot**
31+
* [ ] All Depots
32+
* [ ] Positions by Depot ID
33+
* [ ] Position by Depot ID and Position ID
34+
* [ ] Transactions by Depot ID
8735
* [ ] **Instrument**
8836
* [ ] **Order**
8937
* [ ] Quote

docs/getting-started.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Getting Started
2+
---
3+
The following sections will help you to get started quickly.
4+
5+
### Install
6+
Use `go get` to install the latest version of this library:
7+
8+
```bash
9+
$ go get -u github.com/jsattler/comdirect-golang
10+
```
11+
12+
### Authentication
13+
14+
**Creating a new Authenticator from AuthOptions**:
15+
16+
```go
17+
// omitting error validation, imports and packages
18+
19+
options := &comdirect.AuthOptions{
20+
Username: os.Getenv("COMDIRECT_USERNAME"),
21+
Password: os.Getenv("COMDIRECT_PASSWORD"),
22+
ClientId: os.Getenv("COMDIRECT_CLIENT_ID"),
23+
ClientSecret: os.Getenv("COMDIRECT_CLIENT_SECRET"),
24+
}
25+
authenticator := options.NewAuthenticator()
26+
```
27+
28+
**Creating a new Authenticator with AuthOptions**:
29+
30+
```go
31+
// omitting error validation, imports and packages
32+
33+
options := &comdirect.AuthOptions{
34+
Username: os.Getenv("COMDIRECT_USERNAME"),
35+
Password: os.Getenv("COMDIRECT_PASSWORD"),
36+
ClientId: os.Getenv("COMDIRECT_CLIENT_ID"),
37+
ClientSecret: os.Getenv("COMDIRECT_CLIENT_SECRET"),
38+
}
39+
40+
authenticator := comdirect.NewAuthenticator(options)
41+
```
42+
43+
### Client Creation
44+
45+
**Create a new Client from AuthOptions**
46+
47+
```go
48+
// omitting error validation, imports and packages
49+
50+
options := &comdirect.AuthOptions{
51+
Username: os.Getenv("COMDIRECT_USERNAME"),
52+
Password: os.Getenv("COMDIRECT_PASSWORD"),
53+
ClientId: os.Getenv("COMDIRECT_CLIENT_ID"),
54+
ClientSecret: os.Getenv("COMDIRECT_CLIENT_SECRET"),
55+
}
56+
57+
client := comdirect.NewWithAuthOptions(options)
58+
```

docs/index.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<meta charset="UTF-8">
7-
<!--
87
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css" />
9-
-->
10-
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/dark.css" />
118
</head>
129
<body>
1310
<div id="app"></div>

0 commit comments

Comments
 (0)