Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/booscaaa/juno-go-sdk
SDK to provide access to JUNO API (Open Banking) (2.0.0)
https://github.com/booscaaa/juno-go-sdk
api brazil go golang sdk
Last synced: about 2 months ago
JSON representation
SDK to provide access to JUNO API (Open Banking) (2.0.0)
- Host: GitHub
- URL: https://github.com/booscaaa/juno-go-sdk
- Owner: booscaaa
- License: mit
- Created: 2021-08-04T14:57:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-05T20:47:40.000Z (over 3 years ago)
- Last Synced: 2024-08-03T23:29:33.905Z (5 months ago)
- Topics: api, brazil, go, golang, sdk
- Language: Go
- Homepage: https://dev.juno.com.br/api/v2
- Size: 40 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - juno-go-sdk
README
Juno API - Golang SDK
Juno API (Open Banking) (2.0.0)
## Why?
This project is part of my personal portfolio, so, I'll be happy if you could provide me any feedback about the project, code, structure or anything that you can report that could make me a better developer!
Email-me: [email protected]
Connect with me at [LinkedIn](https://www.linkedin.com/in/booscaaa/).
## Functionalities
- Get authentication token
- Create tokenized card
- Get plans for signatures
- Get plan by ID
- Create plan
- Disable plan by ID
- Enable plan by ID
## Getting Started
### Prerequisites
To run this project in the development mode, you'll need to have a basic environment to run:
- A Golang SDK, that can be found [here](https://golang.org/).
### Installing
```bash
$ go get github.com/booscaaa/juno-go-sdk
```
### Create a config.json file inside your project like this
**The access client_id, client_secret and resource_token can be found into Juno account**
```json
{
"juno": {
"client_id": "cliend id",
"client_secret": "client secret",
"resource_token": "resource token"
}
}
```
### Create main.go file
```go
package mainimport (
"fmt""github.com/booscaaa/juno-go-sdk/juno"
"github.com/spf13/viper"
)func init() {
viper.SetConfigFile(`config.json`)
err := viper.ReadInConfig()
if err != nil {
panic(err)
}
}func main() {
// Get configuration variavables
clientID := viper.GetString("juno.client_id")
clientSecret := viper.GetString("juno.client_secret")
resourceToken := viper.GetString("juno.resource_token")// Configure Sandbox access into Juno api
junoAccess := juno.JunoConfig().
ClientID(clientID).
ClientSecret(clientSecret).
ResourceToken(resourceToken).
Sandbox()junoSdk := juno.Instance(junoAccess)
// Get authentication token from juno api
accessToken, err := junoSdk.GetAuthToken()if err != nil {
fmt.Println(err)
}//Get list plans from juno api
plans, err := junoSdk.GetPlans(*accessToken)if err != nil {
fmt.Println(err)
}//see more examples into examples folder
}
```# Running local
```bash
go run main.go
```
## Api application built With
- [Viper](https://github.com/spf13/viper)
## Contributing
You can send how many PR's do you want, I'll be glad to analyze and accept them! And if you have any question about the project...
Email-me: [email protected]
Connect with me at [LinkedIn](https://www.linkedin.com/in/booscaaa/)
Thank you!
## License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/booscaaa/juno-go-sdk/blob/master/LICENSE) file for details