Permalink
Browse files

updates from new schema

  • Loading branch information...
1 parent 12db056 commit ff1ba73802a8cf09e7b39130a23527ea5520b468 @bgentry committed Jan 15, 2014
Showing with 14 additions and 6 deletions.
  1. +3 −0 addon.go
  2. +3 −0 log_drain.go
  3. +8 −6 plan.go
View
@@ -25,6 +25,9 @@ type Addon struct {
Name string `json:"name"`
} `json:"plan"`
+ // id of this add-on with its provider
+ ProviderId string `json:"provider_id"`
+
// when add-on was updated
UpdatedAt time.Time `json:"updated_at"`
}
View
@@ -24,6 +24,9 @@ type LogDrain struct {
// unique identifier of this log drain
Id string `json:"id"`
+ // token associated with the log drain
+ Token string `json:"token"`
+
// when log drain was updated
UpdatedAt time.Time `json:"updated_at"`
View
@@ -41,18 +41,20 @@ type Plan struct {
// Info for existing plan.
//
+// addonServiceIdentity is the unique identifier of the plan's addon-service.
// planIdentity is the unique identifier of the Plan.
-func (c *Client) PlanInfo(planIdentity string) (*Plan, error) {
+func (c *Client) PlanInfo(addonServiceIdentity string, planIdentity string) (*Plan, error) {
var plan Plan
- return &plan, c.Get(&plan, "/addon-services/{(%2Fschema%2Faddon-service%23%2Fdefinitions%2Fidentity)}/plans/"+planIdentity)
+ return &plan, c.Get(&plan, "/addon-services/"+addonServiceIdentity+"/plans/"+planIdentity)
}
// List existing plans.
//
-// lr is an optional ListRange that sets the Range options for the paginated
-// list of results.
-func (c *Client) PlanList(lr *ListRange) ([]Plan, error) {
- req, err := c.NewRequest("GET", "/addon-services/{(%2Fschema%2Faddon-service%23%2Fdefinitions%2Fidentity)}/plans", nil)
+// addonServiceIdentity is the unique identifier of the plan's addon-service. lr
+// is an optional ListRange that sets the Range options for the paginated list
+// of results.
+func (c *Client) PlanList(addonServiceIdentity string, lr *ListRange) ([]Plan, error) {
+ req, err := c.NewRequest("GET", "/addon-services/"+addonServiceIdentity+"/plans", nil)
if err != nil {
return nil, err
}

0 comments on commit ff1ba73

Please sign in to comment.