repositorypackage
0.0.6
Repository: https://github.com/getapihub/golang-sdk.git
Documentation: pkg.go.dev
# README
GetAPIHub Golang SDK
This is the official Golang SDK for the APIHub API. This SDK provides a convenient way to interact with the APIHub API from your Golang application.
Installation
To install the SDK, run the following command:
go get github.com/getapihub/sdk-go
Usage
Client initialisation:
package main
import (
apihubsdk "github.com/getapihub/golang-sdk"
"github.com/oapi-codegen/oapi-codegen/v2/pkg/securityprovider"
)
func main() {
xApiKeyAuth, err := securityprovider.NewSecurityProviderApiKey("header", "X-API-Key", "{API_KEY}")
if err != nil {
log.Fatal(err)
}
client, err := apihubsdk.NewClientWithResponses("https://gateway.getapihub.cloud", apihubsdk.WithRequestEditorFn(xApiKeyAuth.Intercept))
if err != nil {
panic(err)
}
profile, err = client.GetV2ProfileWithResponse(context.Background(), &apihubsdk.GetV2ProfileParams{
LiProfileUrl: "https://www.linkedin.com/in/username/",
})
}