Adds missing area API.

This commit is contained in:
James Phillips 2017-03-21 23:11:15 -07:00
parent cf1b325e21
commit 7d011d7d77
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 10 additions and 0 deletions

View File

@ -100,6 +100,16 @@ func (op *Operator) AreaCreate(area *Area, q *WriteOptions) (string, *WriteMeta,
return out.ID, wm, nil
}
// AreaGet returns a single network area.
func (op *Operator) AreaGet(areaID string, q *QueryOptions) ([]*Area, *QueryMeta, error) {
var out []*Area
qm, err := op.c.query("/v1/operator/area/"+areaID, &out, q)
if err != nil {
return nil, nil, err
}
return out, qm, nil
}
// AreaList returns all the available network areas.
func (op *Operator) AreaList(q *QueryOptions) ([]*Area, *QueryMeta, error) {
var out []*Area