notifications.go
changeset 102 187aa2a668a5
parent 99 6ec2a44a1bd1
child 120 579912e9d0ef
equal deleted inserted replaced
101:16d7500c19dd 102:187aa2a668a5
    30 
    30 
    31 	return notifications, nil
    31 	return notifications, nil
    32 }
    32 }
    33 
    33 
    34 // GetNotification returns a notification
    34 // GetNotification returns a notification
       
    35 // The returned notification can be nil if there is an error or if the
       
    36 // requested notification does not exist.
    35 func (g *Client) GetNotification(id int) (*Notification, error) {
    37 func (g *Client) GetNotification(id int) (*Notification, error) {
    36 	var notification Notification
    38 	var notification Notification
    37 
    39 
    38 	req := g.prepareRequest("notifications/" + strconv.Itoa(id))
    40 	req := g.prepareRequest("notifications/" + strconv.Itoa(id))
    39 	r, err := rest.API(req)
    41 	r, err := rest.API(req)