-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add constants for alert contact types #23
Comments
Hey i would like to contribute to this project or rather help solve the issue can you please guide me. |
Hey @ItsTalha0, welcome aboard! I shall be delighted if you would like to work on this issue. You'll see from the Uptime Robot API documentation that alert contacts (ways to notify people if a monitoring check fails) have a 'Type' which indicates what kind of contact they are: 1 - SMS Right now we deal with contact types in the AlertContact{
ID: "0993765",
FriendlyName: "John Doe",
Type: 2,
Status: 1,
Value: "[email protected]",
} Instead, we would like to be able to use helpful names for these types, defined as constants. For example: AlertContact{
...
Type: ContactEmail,
...
} Here we've defined the constant So much for creating alert contacts with the friendly names, but we would also like to be able to display them in some way. Right now when we print out an alert contact type it just shows Monitors also have types, defined by constants such as func (m Monitor) FriendlyType() string {
switch m.Type {
case TypeHTTP:
return "HTTP"
...
} Do you think you could create something similar for alert contacts? Let me know if you'd like more help. |
Thanks for considering, I will need to get aquinted with the project |
Added in #26 |
No description provided.
The text was updated successfully, but these errors were encountered: