From 134775085f65114d272336c0374f0b5dd70013fd Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 19 Oct 2019 22:59:00 +0200 Subject: [PATCH] Updated readme --- README.md | 68 ++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index d7e1b84..058da8f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,44 @@ -# Go API client for swagger +# Go API client for vikunja -This is the documentation for the [Vikunja](http://vikunja.io) API. Vikunja is a cross-plattform Todo-application with a lot of features, such as sharing lists with users or teams. # Authorization **JWT-Auth:** Main authorization method, used for most of the requests. Needs `Authorization: Bearer `-header to authenticate successfully. **BasicAuth:** Only used when requesting tasks via caldav. +This is the documentation for the [Vikunja](http://vikunja.io) API. Vikunja is a cross-plattform Todo-application with a lot of features, such as sharing lists with users or teams. ## Overview + This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. -- API version: 0.8+21-854fde1e4c -- Package version: 1.0.0 -- Build package: io.swagger.codegen.languages.GoClientCodegen -For more information, please visit [http://vikunja.io/en/contact/](http://vikunja.io/en/contact/) +* API version: 0.8+21-854fde1e4c + +## Authorization + +* **JWT-Auth:** Main authorization method, used for most of the requests. Needs `Authorization: Bearer `-header to authenticate successfully. +* **BasicAuth:** Only used when requesting tasks via caldav. + +#### HTTP basic authentication + +``` +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + +#### JWTKeyAuth - API key + +``` +auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ + Key: "APIKEY", + Prefix: "Bearer", // Omit if not necessary. +}) +r, err := client.Service.Operation(auth, args) +``` ## Installation + Put the package under your project folder and add the following in import: + ``` - "./swagger" +go get -u code.vikunja.io/go-sdk ``` ## Documentation for API Endpoints @@ -135,32 +160,3 @@ Class | Method | HTTP request | Description - [V1VikunjaInfos](docs/V1VikunjaInfos.md) -## Documentation For Authorization - -## BasicAuth -- **Type**: HTTP basic authentication - -Example -``` - auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", - }) - r, err := client.Service.Operation(auth, args) -``` -## JWTKeyAuth -- **Type**: API key - -Example -``` - auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ - Key: "APIKEY", - Prefix: "Bearer", // Omit if not necessary. - }) - r, err := client.Service.Operation(auth, args) -``` - -## Author - -hello@vikunja.io -