README.md
1<p align="center"><img width="50%" src="docs/static_files/sdk-artwork.png" /></p>
2
3<p align="center">
4 <a href="https://pkg.go.dev/github.com/scaleway/scaleway-sdk-go?tab=doc"><img src="https://pkg.go.dev/badge/github.com/scaleway/scaleway-sdk-go/" alt="PkgGoDev"></a>
5 <a href="https://github.com/scaleway/scaleway-sdk-go/actions?query=workflow%3Apull-request"><img src="https://github.com/scaleway/scaleway-sdk-go/workflows/pull-request/badge.svg" alt="GitHub Actions" /></a>
6 <a href="https://goreportcard.com/report/github.com/scaleway/scaleway-sdk-go"><img src="https://goreportcard.com/badge/scaleway/scaleway-sdk-go" alt="GoReportCard" /></a>
7</p>
8
9# Scaleway GO SDK
10
11**:warning: This is an early release, keep in mind that the API can break**
12
13Scaleway is a single way to create, deploy and scale your infrastructure in the cloud. We help thousands of businesses to run their infrastructures easily.
14
15## Documentation
16
17- [Godoc](https://pkg.go.dev/github.com/scaleway/scaleway-sdk-go?tab=doc)
18- [Developers website](https://developers.scaleway.com) (API documentation)
19
20## Installation
21
22```bash
23go get github.com/scaleway/scaleway-sdk-go
24```
25
26## Getting Started
27
28```go
29package main
30
31import (
32 "fmt"
33
34 "github.com/scaleway/scaleway-sdk-go/api/instance/v1"
35 "github.com/scaleway/scaleway-sdk-go/scw"
36 "github.com/scaleway/scaleway-sdk-go/utils"
37)
38
39func main() {
40
41 // Create a Scaleway client
42 client, err := scw.NewClient(
43 // Get your credentials at https://console.scaleway.com/project/credentials
44 scw.WithDefaultOrganizationID("ORGANISATION_ID"),
45 scw.WithAuth("ACCESS_KEY", "SECRET_KEY"),
46 )
47 if err != nil {
48 panic(err)
49 }
50
51 // Create SDK objects for Scaleway Instance product
52 instanceApi := instance.NewAPI(client)
53
54 // Call the ListServers method on the Instance SDK
55 response, err := instanceApi.ListServers(&instance.ListServersRequest{
56 Zone: scw.ZoneFrPar1,
57 })
58 if err != nil {
59 panic(err)
60 }
61
62 // Do something with the response...
63 for _, server := range response.Servers {
64 fmt.Println("Server", server.ID, server.Name)
65 }
66
67}
68```
69
70## Examples
71
72You can find additional examples in the [GoDoc](https://pkg.go.dev/github.com/scaleway/scaleway-sdk-go?tab=doc).
73
74## Development
75
76This repository is at its early stage and is still in active development.
77If you are looking for a way to contribute please read [CONTRIBUTING.md](CONTRIBUTING.md).
78
79## Reach us
80
81We love feedback.
82Feel free to reach us on [Scaleway Slack community](https://slack.scaleway.com/), we are waiting for you on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource).
83