-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from iLert/feature/status-page-service-groups
Feature/status page service groups
- Loading branch information
Showing
10 changed files
with
394 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
|
||
"github.com/iLert/ilert-go/v2" | ||
) | ||
|
||
func main() { | ||
var apiToken = "your API token" | ||
client := ilert.NewClient(ilert.WithAPIToken(apiToken)) | ||
newStatusPageGroup := &ilert.StatusPageGroup{ | ||
Name: "your status page group name", | ||
} | ||
statusPage := &ilert.StatusPage{ID: 0} // your status page id | ||
input := &ilert.CreateStatusPageGroupInput{ | ||
StatusPageGroup: newStatusPageGroup, | ||
StatusPageID: &statusPage.ID, | ||
} | ||
result, err := client.CreateStatusPageGroup(input) | ||
if err != nil { | ||
log.Println(result) | ||
log.Fatalln("ERROR:", err) | ||
} | ||
log.Println(fmt.Sprintf("Statuspage Group:\n\n %+v\n", result.StatusPageGroup)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.