Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 3.9% on proxy.golang.org
Top 3.4% dependent packages on proxy.golang.org
Top 1.7% dependent repos on proxy.golang.org
Top 5.5% forks on proxy.golang.org

proxy.golang.org : github.com/bgentry/heroku-go

Package heroku is a client interface to the Heroku API. This package provides a complete interface to all of the Heroku Platform API v3 actions, and is almost entirely auto-generated based on the API's JSON Schema. The exceptions are the files heroku.go, heroku_test.go, and app_test.go, as well as the generator itself. All models are auto-generated by the Ruby script in gen/gen.rb. The client leverages Go's powerful net/http Client. That means that, out-of-the-box, it has keep-alive support and the ability to handle many concurrent requests from different goroutines. You should have at least some understanding of Heroku and its Platform API: https://devcenter.heroku.com/articles/platform-api-reference This package is targeted towards Go 1.2 or later, though it may work on earlier versions as well. Run `go get github.com/bgentry/heroku-go` to download, build, and install the package. To use the client, first add it to your Go file's imports list: Then create a Client object and make calls to it: That's it! Here is a more advanced example that also sets some options on the new app: Many of the Heroku Platform API actions have optional parameters. For example, when creating an app, you can either specify a custom name, or allow the API to choose a random haiku name for your app. Optional parameters in heroku-go are always provided to functions as a pointer to a struct, such as AppCreateOpts for the function AppCreate(). If you do not wish to set any optional parameters, simply provide a nil in place of the options struct, and the options will be omitted from the API request entirely. For any individual options that you don't want to set, simply leave them as nil, and they will be omitted from the API request. List Ranges & Sorting Results from the Heroku API are paginated. You can specify a field for sorting and adjust the maximum number of records returned by providing a ListRange to API calls that list objects: Note Field is required when setting any range options.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/bgentry/heroku-go
License: MIT
Latest release: almost 9 years ago
First release: almost 9 years ago
Namespace: github.com/bgentry
Dependent packages: 3
Dependent repositories: 10
Stars: 76 on GitHub
Forks: 15 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 13 days ago

    Loading...
    Readme
    Loading...