Skip to content

operandinc/ramp-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unofficial Go client library for Ramp.

To re-generate:
> wget https://docs.ramp.com/openapi/developer-api.json
> oapi-codegen -package ramp -generate "types,client,spec" developer-api.json > ramp.gen.go
> rm -f developer-api.json

One-time dependency installation for generation:
> go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest

Creating a new client (w/ authorization):
```
client, err := ramp.NewClient(
    rampServer,
    ramp.WithRequestEditorFn(func(ctx context.Context, req *http.Request) error {
        req.Header.Set(
            "Authorization",
            fmt.Sprintf("Bearer %s", connection.GetAccessToken()),
        )
        return nil
    }),
)
if err != nil {
    return fmt.Errorf("error creating ramp client: %w", err)
}
```

About

Unofficial Go client library for Ramp.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published