Coder Social home page Coder Social logo

opsgenie-go-sdk's People

Contributors

alpgurtan avatar bkaganyildiz avatar celalemre avatar cglrkn avatar cpanato avatar ellimist avatar faziletozer avatar mustafanacar avatar phoolish avatar tombuildsstuff avatar tubaozturk avatar tubaozturk92 avatar victortrac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opsgenie-go-sdk's Issues

panic when acktime is going beyond in32

panic: Server response can not be parsed, json: cannot unmarshal number 2269846187 into Go struct field Report.data.report.ackTime of type int32

through the api I'm trying to list alerts created. then I faced this issue

teamv2

Hey,
I'm in a quite urgent need of the teamv2 API. I basically just need the List/GetAll call. Is it planned to add this soon? If not I will fallback to an HTTP call.
Thanks

Heartbeat List still using V1 API

I'm trying to use the Heartbeat API but when I do a List I get an error:

Unable to list existing heartbeats to sync: Client error occurred; Response Code: 410, Response Body: Heartbeat API v1 is deprecated. Please refer https://docs.opsgenie.com/docs/heartbeat-api for details of the new version

I think this is because the v1 api is still used for list: https://github.com/opsgenie/opsgenie-go-sdk/blob/master/client/opsgenie_heartbeat_client.go#L11

There is a v2 of the heartbeat REST api from what I can see: https://docs.opsgenie.com/docs/heartbeat-api#section-list-heartbeats

Happy to submit a PR to move to the new API if that would be useful

whoIsOnCall API is broken

error:

Response Code: 400, Response Body: No handler found for url /v1/json/schedule/whoIsOnCall

from what I see from other clients it should be v1.1

Issue using opsgenie-go-sdk with URL parameters.

The SDK uses a function to translate the request struct to URL Parameters, but those parameters are not aligned with the caps that the API requires.
For example the url parameter apiKey will become APIKey(which is based on the naming of the struct and not the naming of the JSON) - the result for that will be a request cannot have an empty apiKey value.

alertsV2: Paged results

Hi,

I'm trying to figure out what is the way to access paged results of alerts in V2 ? Right now I get a list of alerts with maximal limit set ( 100 ) but alerts total number is bigger than this. :(

I query for alerts using query which looks like

"createdAt > "2018-02-21T00:01:00Z" createdAt < "2018-03-14T23:39:00Z" teams:avengers entity:abc OR ABC"

So for now I created additional function within my app and this is the flow :

shouldCheckForMoreAlerts

is used to determine if last item in array of alerts is within my timeframes of my provided query

// shouldCheckForMoreAlerts returns boolean value if last alert in returned list
// 							is within our requested timeframes
//
func shouldCheckForMoreAlerts(alerts []alertsv2.Alert, start, end time.Time) bool {
	return inTimeSpan(start, end, alerts[len(alerts)-1].CreatedAt)
}

Query for alerts

Within my app I then use the following piece of code to execute

	opsGenieAlertsList, _ := listOpsGenieAlerts(alertsQuery, alertsOffset)

	for checkForMore := true; checkForMore; checkForMore = (shouldCheckForMoreAlerts(opsGenieAlertsList.Alerts, beginAt, stopAt)) {
		for _, singleAlert := range opsGenieAlertsList.Alerts {

                  // ...
		  // removed code for readability 

		}

		alertsOffset += 20
		opsGenieAlertsList, _ = listOpsGenieAlerts(alertsQuery, alertsOffset)

	}

this is more less PoC version than something final ;) - just FYI

Now my question would be what is suggested way ahead here ? Is this approach is okish ?

V2: AlertID from Create()

Currently using a v2 client and calling create() returns an *AsyncRequestResponse. Is it possible either now or in the future to return the ID of the created alert either with the returned request response struct, or with a subsequent call using the returned request ID?

V2

What’s the timeline for getting a fully functional SDK using the V2 apis?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.