Go openapi client for the Microsoft Security Response Center (MSRC) API
This API client was generated by using the OpenAPI Generator project.
Please have a look at the generated README for additional information.
The following code shows how the client can be used to get the Patchday data for a specific month.
Please refer to the official documentation for advanced usage of this client.
package main
import (
"context"
"fmt"
"os"
"github.com/rhaist/go-MSRC/openapi"
)
const API_KEY = "CHANGEME"
func main() {
key := "2021-Feb" // string | update ID (yyyy-mmm), vulnerability ID (CVE number), or year (yyyy)
configuration := openapi.NewConfiguration()
api_client := openapi.NewAPIClient(configuration)
resp, r, err := api_client.GetSecurityUpdatesApi.UpdatesGetUpdatesByKey(context.Background(), key).ApiVersion(apiVersion).Execute()
if err.Error() != "" {
fmt.Fprintf(os.Stderr, "Error when calling `GetSecurityUpdatesApi.UpdatesGetUpdatesByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdatesGetUpdatesByKey`: InlineResponse200
fmt.Fprintf(os.Stdout, "Response from `GetSecurityUpdatesApi.UpdatesGetUpdatesByKey`: %v\n", resp)
}
This software is distributed under the MIT license. Please have a look at the LICENSE file in the source distribution.