pushbullet.go
func (c *Client) Subscription(tag string) (*Subscription, error) {
	subs, err := c.Subscriptions()
	if err != nil {
		return nil, err
	}

	for i := range subs {
		if subs[i].Channel.Tag == tag {
			subs[i].Client = c
			return subs[i], nil
		}
	}
	return nil, ErrDeviceNotFound
}
func (c *Client) Subscription(tag string) (*Subscription, error) {
	subs, err := c.Subscriptions()
	if err != nil {
		return nil, err
	}

	for i := range subs {
		if subs[i].Channel.Tag == tag {
			subs[i].Client = c
			return subs[i], nil
		}
	}
	return nil, ErrDeviceNotFound
}
func ( c * Client ) Subscription ( tag string ) ( * Subscription , error ) { subs , err := c . Subscriptions ( ) if err != nil { return nil , err } for i := range subs { if subs [ i ] . Channel . Tag == tag { subs [ i ] . Client = c return subs [ i ] , nil } } return nil , ErrDeviceNotFound }
// Subscription fetches an subscription with a given channel tag from PushBullet.
Subscription fetches an subscription with a given channel tag from PushBullet .